Auth0-PHP

Assert
in package

Read onlyYes
FinalYes

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
throws
Exception

when subject is not an array or is empty

isBoolean()

Check that a variable is a boolean and is not null.

public isBoolean() : void
Tags
throws
Exception

when subject is not a boolean or is null

isEmail()

Check that a variable is a non-empty string that contains a valid email address.

public isEmail() : void
Tags
throws
Exception

when subject is not a valid email address

isInteger()

Check that a variable is an integer and is not null.

public isInteger() : void
Tags
throws
Exception

when subject is not an integer or is null

isPermissions()

Check for invalid permissions with an array of permissions.

public isPermissions() : void
Tags
throws
Exception

when subject is not a permissions array or is empty

isString()

Check that a variable is a string and is not empty.

public isString() : void
Tags
throws
Exception

when subject is not a string or is empty

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.

Tags
throws
Exception

when subject is not a string or does not begin with a valid URI scheme

On this page

Search results