API - XOOPS 2.5.11 Beta 2
By monxoops.fr
|
Static Public Member Functions | |
static | string ($value, $message='') |
static | stringNotEmpty ($value, $message='') |
static | integer ($value, $message='') |
static | integerish ($value, $message='') |
static | float ($value, $message='') |
static | numeric ($value, $message='') |
static | natural ($value, $message='') |
static | boolean ($value, $message='') |
static | scalar ($value, $message='') |
static | object ($value, $message='') |
static | resource ($value, $type=null, $message='') |
static | isCallable ($value, $message='') |
static | isArray ($value, $message='') |
static | isTraversable ($value, $message='') |
static | isArrayAccessible ($value, $message='') |
static | isCountable ($value, $message='') |
static | isIterable ($value, $message='') |
static | isInstanceOf ($value, $class, $message='') |
static | notInstanceOf ($value, $class, $message='') |
static | isInstanceOfAny ($value, array $classes, $message='') |
static | isAOf ($value, $class, $message='') |
static | isNotA ($value, $class, $message='') |
static | isAnyOf ($value, array $classes, $message='') |
static | isEmpty ($value, $message='') |
static | notEmpty ($value, $message='') |
static | null ($value, $message='') |
static | notNull ($value, $message='') |
static | true ($value, $message='') |
static | false ($value, $message='') |
static | notFalse ($value, $message='') |
static | ip ($value, $message='') |
static | ipv4 ($value, $message='') |
static | ipv6 ($value, $message='') |
static | email ($value, $message='') |
static | uniqueValues (array $values, $message='') |
static | eq ($value, $expect, $message='') |
static | notEq ($value, $expect, $message='') |
static | same ($value, $expect, $message='') |
static | notSame ($value, $expect, $message='') |
static | greaterThan ($value, $limit, $message='') |
static | greaterThanEq ($value, $limit, $message='') |
static | lessThan ($value, $limit, $message='') |
static | lessThanEq ($value, $limit, $message='') |
static | range ($value, $min, $max, $message='') |
static | oneOf ($value, array $values, $message='') |
static | inArray ($value, array $values, $message='') |
static | contains ($value, $subString, $message='') |
static | notContains ($value, $subString, $message='') |
static | notWhitespaceOnly ($value, $message='') |
static | startsWith ($value, $prefix, $message='') |
static | notStartsWith ($value, $prefix, $message='') |
static | startsWithLetter ($value, $message='') |
static | endsWith ($value, $suffix, $message='') |
static | notEndsWith ($value, $suffix, $message='') |
static | regex ($value, $pattern, $message='') |
static | notRegex ($value, $pattern, $message='') |
static | unicodeLetters ($value, $message='') |
static | alpha ($value, $message='') |
static | digits ($value, $message='') |
static | alnum ($value, $message='') |
static | lower ($value, $message='') |
static | upper ($value, $message='') |
static | length ($value, $length, $message='') |
static | minLength ($value, $min, $message='') |
static | maxLength ($value, $max, $message='') |
static | lengthBetween ($value, $min, $max, $message='') |
static | fileExists ($value, $message='') |
static | file ($value, $message='') |
static | directory ($value, $message='') |
static | readable ($value, $message='') |
static | writable ($value, $message='') |
static | classExists ($value, $message='') |
static | subclassOf ($value, $class, $message='') |
static | interfaceExists ($value, $message='') |
static | implementsInterface ($value, $interface, $message='') |
static | propertyExists ($classOrObject, $property, $message='') |
static | propertyNotExists ($classOrObject, $property, $message='') |
static | methodExists ($classOrObject, $method, $message='') |
static | methodNotExists ($classOrObject, $method, $message='') |
static | keyExists ($array, $key, $message='') |
static | keyNotExists ($array, $key, $message='') |
static | validArrayKey ($value, $message='') |
static | count ($array, $number, $message='') |
static | minCount ($array, $min, $message='') |
static | maxCount ($array, $max, $message='') |
static | countBetween ($array, $min, $max, $message='') |
static | isList ($array, $message='') |
static | isNonEmptyList ($array, $message='') |
static | isMap ($array, $message='') |
static | isNonEmptyMap ($array, $message='') |
static | uuid ($value, $message='') |
static | throws (Closure $expression, $class='Exception', $message='') |
static | __callStatic ($name, $arguments) |
Static Protected Member Functions | |
static | valueToString ($value) |
static | typeToString ($value) |
static | strlen ($value) |
static | reportInvalidArgument ($message) |
|
static |
BadMethodCallException |
|
static |
@psalm-pure
string | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert bool $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-assert class-string $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
string | $value | |
string | $subString | |
string | $message |
InvalidArgumentException |
|
static |
Does not check if $array is countable, this can generate a warning on php versions after 7.2.
Countable | array | $array | |
int | $number | |
string | $message |
InvalidArgumentException |
|
static |
Does not check if $array is countable, this can generate a warning on php versions after 7.2.
Countable | array | $array | |
int | float | $min | |
int | float | $max | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
string | $value | |
string | $message |
InvalidArgumentException |
|
static |
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
string | $value | |
string | $suffix | |
string | $message |
InvalidArgumentException |
|
static |
mixed | $value | |
mixed | $expect | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert false $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
Will also pass if $value is a directory, use Assert::file() instead if you need to be sure it is a file.
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert float $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
mixed | $value | |
mixed | $limit | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
mixed | $value | |
mixed | $limit | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $interface @psalm-assert class-string<ExpectedType> $value
mixed | $value | |
mixed | $interface | |
string | $message |
InvalidArgumentException |
|
static |
Does strict comparison, so Assert::inArray(3, ['3']) does not pass the assertion.
@psalm-pure
mixed | $value | |
array | $values | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert int $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert numeric $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-assert class-string $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-param array<class-string> $classes
object | string | $value | |
string[] | $classes | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $class @psalm-assert ExpectedType|class-string<ExpectedType> $value
object | string | $value | |
string | $class | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert array $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert array|ArrayAccess $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert callable $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert countable $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert empty $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $class @psalm-assert ExpectedType $value
mixed | $value | |
string | object | $class | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-param array<class-string> $classes
mixed | $value | |
array<object|string> | $classes | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert iterable $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert list $array
mixed | $array | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-template T @psalm-param mixed|array<T> $array @psalm-assert array<string, T> $array
mixed | $array | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert non-empty-list $array
mixed | $array | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-template T @psalm-param mixed|array<T> $array @psalm-assert array<string, T> $array @psalm-assert !empty $array
mixed | $array | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-template UnexpectedType of object @psalm-param class-string<UnexpectedType> $class @psalm-assert !UnexpectedType $value @psalm-assert !class-string<UnexpectedType> $value
object | string | $value | |
string | $class | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert iterable $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
array | $array | |
string | int | $key | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
array | $array | |
string | int | $key | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
string | $value | |
int | $length | |
string | $message |
InvalidArgumentException |
|
static |
Inclusive , so Assert::lengthBetween('asd', 3, 5); passes the assertion.
@psalm-pure
string | $value | |
int | float | $min | |
int | float | $max | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
mixed | $value | |
mixed | $limit | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
mixed | $value | |
mixed | $limit | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert lowercase-string $value
string | $value | |
string | $message |
InvalidArgumentException |
|
static |
Does not check if $array is countable, this can generate a warning on php versions after 7.2.
Countable | array | $array | |
int | float | $max | |
string | $message |
InvalidArgumentException |
|
static |
Inclusive max.
@psalm-pure
string | $value | |
int | float | $max | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-param class-string|object $classOrObject
string | object | $classOrObject | |
mixed | $method | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-param class-string|object $classOrObject
string | object | $classOrObject | |
mixed | $method | |
string | $message |
InvalidArgumentException |
|
static |
Does not check if $array is countable, this can generate a warning on php versions after 7.2.
Countable | array | $array | |
int | float | $min | |
string | $message |
InvalidArgumentException |
|
static |
Inclusive min.
@psalm-pure
string | $value | |
int | float | $min | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert int $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
string | $value | |
string | $subString | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert !empty $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
string | $value | |
string | $suffix | |
string | $message |
InvalidArgumentException |
|
static |
mixed | $value | |
mixed | $expect | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert !false $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $class @psalm-assert !ExpectedType $value
mixed | $value | |
string | object | $class | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert !null $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
string | $value | |
string | $pattern | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
mixed | $value | |
mixed | $expect | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
string | $value | |
string | $prefix | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
string | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert null $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert numeric $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert object $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
A more human-readable alias of Assert::inArray().
@psalm-pure
mixed | $value | |
array | $values | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-param class-string|object $classOrObject
string | object | $classOrObject | |
mixed | $property | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-param class-string|object $classOrObject
string | object | $classOrObject | |
mixed | $property | |
string | $message |
InvalidArgumentException |
|
static |
Inclusive range, so Assert::(3, 3, 5) passes.
@psalm-pure
mixed | $value | |
mixed | $min | |
mixed | $max | |
string | $message |
InvalidArgumentException |
|
static |
string | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
string | $value | |
string | $pattern | |
string | $message |
InvalidArgumentException |
|
staticprotected |
string | $message |
InvalidArgumentException |
@psalm-pure this method is not supposed to perform side-effects
|
static |
@psalm-pure @psalm-assert resource $value
mixed | $value | |
string | null | $type | type of resource this should be. |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
mixed | $value | |
mixed | $expect | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert scalar $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
string | $value | |
string | $prefix | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert string $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert non-empty-string $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
staticprotected |
|
static |
@psalm-pure @psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $class @psalm-assert class-string<ExpectedType>|ExpectedType $value
mixed | $value | |
string | object | $class | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-param class-string<Throwable> $class
Closure | $expression | |
string | $class | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert true $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
staticprotected |
mixed | $value |
|
static |
@psalm-pure
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
Does non strict comparisons on the items, so ['3', 3] will not pass the assertion.
array | $values | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure @psalm-assert !lowercase-string $value
string | $value | |
string | $message |
InvalidArgumentException |
|
static |
@psalm-pure
string | $value | |
string | $message |
InvalidArgumentException |
|
static |
Checks if a value is a valid array key (int or string).
@psalm-pure @psalm-assert array-key $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
staticprotected |
mixed | $value |
|
static |
string | $value | |
string | $message |
InvalidArgumentException |