Assert
in package
Table of Contents
Properties
- $subjects : array<string|int, mixed>
Methods
- __construct() : mixed
- ArrayProcessor Constructor.
- isArray() : void
- Check that a variable is an array and is not empty.
- isBoolean() : void
- Check that a variable is a boolean and is not null.
- isEmail() : void
- Check that a variable is a non-empty string that contains a valid email address.
- isInteger() : void
- Check that a variable is an integer and is not null.
- isPermissions() : void
- Check for invalid permissions with an array of permissions.
- isString() : void
- Check that a variable is a string and is not empty.
- isUri() : void
- Check that a variable is a string beginning with a valid URI scheme. Accepts any RFC 3986 scheme, including custom URNs (e.g. `urn:acme:token`), so it does not use FILTER_VALIDATE_URL.
Properties
$subjects
private
array<string|int, mixed>
$subjects
Methods
__construct()
ArrayProcessor Constructor.
public
__construct(array<string|int, Throwable}> $subjects) : mixed
Parameters
- $subjects : array<string|int, Throwable}>
-
values to process
isArray()
Check that a variable is an array and is not empty.
public
isArray() : void
Tags
isBoolean()
Check that a variable is a boolean and is not null.
public
isBoolean() : void
Tags
isEmail()
Check that a variable is a non-empty string that contains a valid email address.
public
isEmail() : void
Tags
isInteger()
Check that a variable is an integer and is not null.
public
isInteger() : void
Tags
isPermissions()
Check for invalid permissions with an array of permissions.
public
isPermissions() : void
Tags
isString()
Check that a variable is a string and is not empty.
public
isString() : void
Tags
isUri()
Check that a variable is a string beginning with a valid URI scheme. Accepts any RFC 3986 scheme, including custom URNs (e.g. `urn:acme:token`), so it does not use FILTER_VALIDATE_URL.
public
isUri() : void
Only the presence of a scheme is validated, not the rest of the URI. urn: and x: pass. This is a cheap client-side guard to catch obvious mistakes before a network call, not a full URI validator.