Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques statiques | |
static | string ($value, $message='') |
static | stringNotEmpty ($value, $message='') |
static | integer ($value, $message='') |
static | integerish ($value, $message='') |
static | positiveInteger ($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) |
Fonctions membres protégées statiques | |
static | valueToString ($value) |
static | typeToString ($value) |
static | strlen ($value) |
static | reportInvalidArgument ($message) |
Fonctions membres privées | |
__construct () | |
Efficient assertions to validate the input/output of your methods.
|
private |
|
static |
BadMethodCallException |
Références $method, $name, et Assert\null().
|
static |
|
static |
|
static |
|
static |
-assert class-string $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
|
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 |
Références $message.
Référencé par Assert\countBetween(), Assert\maxCount(), Assert\minCount(), et Assert\uniqueValues().
|
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 |
Références $count, $message, et Assert\count().
|
static |
|
static |
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
-pure
string | $value | |
string | $suffix | |
string | $message |
InvalidArgumentException |
Références $message, $suffix, $value, et Assert\strlen().
|
static |
mixed | $value | |
mixed | $expect | |
string | $message |
InvalidArgumentException |
|
static |
-pure -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 |
-pure -assert float $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
|
static |
|
static |
-pure -template ExpectedType of object -param class-string<ExpectedType> $interface -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.
-pure
mixed | $value | |
array | $values | |
string | $message |
InvalidArgumentException |
|
static |
|
static |
-pure -assert numeric $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
-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 |
-pure -param array<class-string> $classes
object | string | $value | |
string[] | $classes | |
string | $message |
InvalidArgumentException |
|
static |
-pure -template ExpectedType of object -param class-string<ExpectedType> $class -assert ExpectedType|class-string<ExpectedType> $value
object | string | $value | |
string | $class | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert array $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert array|ArrayAccess $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert callable $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert countable $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert empty $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
-pure -template ExpectedType of object -param class-string<ExpectedType> $class -assert ExpectedType $value
mixed | $value | |
string | object | $class | |
string | $message |
InvalidArgumentException |
|
static |
-pure -param array<class-string> $classes
mixed | $value | |
array<object|string> | $classes | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert iterable $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert list $array
mixed | $array | |
string | $message |
InvalidArgumentException |
Références $message.
|
static |
-pure -template T -param mixed|array<T> $array -assert array<string, T> $array
mixed | $array | |
string | $message |
InvalidArgumentException |
Références $message.
|
static |
-pure -assert non-empty-list $array
mixed | $array | |
string | $message |
InvalidArgumentException |
Références $message.
|
static |
-pure -template T -param mixed|array<T> $array -assert array<string, T> $array -assert !empty $array
mixed | $array | |
string | $message |
InvalidArgumentException |
Références $message.
|
static |
-pure -template UnexpectedType of object -param class-string<UnexpectedType> $class -assert !UnexpectedType $value -assert !class-string<UnexpectedType> $value
object | string | $value | |
string | $class | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert iterable $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
|
static |
|
static |
|
static |
Inclusive , so Assert::lengthBetween('asd', 3, 5); passes the assertion.
-pure
string | $value | |
int | float | $min | |
int | float | $max | |
string | $message |
InvalidArgumentException |
|
static |
|
static |
|
static |
-pure -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 |
Références $message, et Assert\count().
|
static |
Inclusive max.
-pure
string | $value | |
int | float | $max | |
string | $message |
InvalidArgumentException |
|
static |
-pure -param class-string|object $classOrObject
string | object | $classOrObject | |
mixed | $method | |
string | $message |
InvalidArgumentException |
|
static |
-pure -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 |
Références $message, et Assert\count().
|
static |
Inclusive min.
-pure
string | $value | |
int | float | $min | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert positive-int|0 $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
|
static |
-pure -assert !empty $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
-pure
string | $value | |
string | $suffix | |
string | $message |
InvalidArgumentException |
Références $message, $suffix, $value, et Assert\strlen().
|
static |
mixed | $value | |
mixed | $expect | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert !false $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
-pure -template ExpectedType of object -param class-string<ExpectedType> $class -assert !ExpectedType $value
mixed | $value | |
string | object | $class | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert !null $value
mixed | $value | |
string | $message |
InvalidArgumentException |
Références $message, $value, et Assert\null().
|
static |
|
static |
|
static |
|
static |
|
static |
-pure -assert null $value
mixed | $value | |
string | $message |
InvalidArgumentException |
Références $message, et $value.
Référencé par Assert\__callStatic(), Assert\notNull(), et Assert\valueToString().
|
static |
-pure -assert numeric $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert object $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
A more human-readable alias of Assert::inArray().
-pure
mixed | $value | |
array | $values | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert positive-int $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
-pure -param class-string|object $classOrObject
string | object | $classOrObject | |
mixed | $property | |
string | $message |
InvalidArgumentException |
Références $message.
|
static |
-pure -param class-string|object $classOrObject
string | object | $classOrObject | |
mixed | $property | |
string | $message |
InvalidArgumentException |
Références $message.
|
static |
Inclusive range, so Assert::(3, 3, 5) passes.
-pure
mixed | $value | |
mixed | $min | |
mixed | $max | |
string | $message |
InvalidArgumentException |
|
static |
string | $value | |
string | $message |
InvalidArgumentException |
|
static |
|
staticprotected |
string | $message |
InvalidArgumentException | -pure this method is not supposed to perform side-effects |
Références $message.
|
static |
-pure -assert resource $value
mixed | $value | |
string | null | $type | type of resource this should be. |
string | $message |
InvalidArgumentException |
|
static |
|
static |
-pure -assert scalar $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
|
static |
|
static |
-pure -assert string $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
static |
-pure -assert non-empty-string $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
staticprotected |
Références $value.
Référencé par Assert\endsWith(), et Assert\notEndsWith().
|
static |
-pure -template ExpectedType of object -param class-string<ExpectedType> $class -assert class-string<ExpectedType>|ExpectedType $value
mixed | $value | |
string | object | $class | |
string | $message |
InvalidArgumentException |
|
static |
-param class-string<Throwable> $class
Closure | $expression | |
string | $class | |
string | $message |
InvalidArgumentException |
|
static |
|
staticprotected |
|
static |
|
static |
Does non strict comparisons on the items, so ['3', 3] will not pass the assertion.
array | $values | |
string | $message |
InvalidArgumentException |
Références $message, et Assert\count().
|
static |
-pure -assert !lowercase-string $value
string | $value | |
string | $message |
InvalidArgumentException |
|
static |
|
static |
Checks if a value is a valid array key (int or string).
-pure -assert array-key $value
mixed | $value | |
string | $message |
InvalidArgumentException |
|
staticprotected |
|
static |
string | $value | |
string | $message |
InvalidArgumentException |