XOOPS API 2.5.11 Beta1  UI v0.5
Réalisé par monxoops.fr
Référence de la classe Assert
+ Graphe d'héritage de Assert:

Fonctions membres publiques statiques

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 isEmpty ($value, $message='')
 
static notEmpty ($value, $message='')
 
static null ($value, $message='')
 
static notNull ($value, $message='')
 
static true ($value, $message='')
 
static false ($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 contains ($value, $subString, $message='')
 
static notContains ($value, $subString, $message='')
 
static notWhitespaceOnly ($value, $message='')
 
static startsWith ($value, $prefix, $message='')
 
static startsWithLetter ($value, $message='')
 
static endsWith ($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 ()
 

Description détaillée

Efficient assertions to validate the input/output of your methods.

@method static void nullOrString($value, $message = '') @method static void nullOrStringNotEmpty($value, $message = '') @method static void nullOrInteger($value, $message = '') @method static void nullOrIntegerish($value, $message = '') @method static void nullOrFloat($value, $message = '') @method static void nullOrNumeric($value, $message = '') @method static void nullOrNatural($value, $message = '') @method static void nullOrBoolean($value, $message = '') @method static void nullOrScalar($value, $message = '') @method static void nullOrObject($value, $message = '') @method static void nullOrResource($value, $type = null, $message = '') @method static void nullOrIsCallable($value, $message = '') @method static void nullOrIsArray($value, $message = '') @method static void nullOrIsTraversable($value, $message = '') @method static void nullOrIsArrayAccessible($value, $message = '') @method static void nullOrIsCountable($value, $message = '') @method static void nullOrIsIterable($value, $message = '') @method static void nullOrIsInstanceOf($value, $class, $message = '') @method static void nullOrNotInstanceOf($value, $class, $message = '') @method static void nullOrIsInstanceOfAny($value, $classes, $message = '') @method static void nullOrIsEmpty($value, $message = '') @method static void nullOrNotEmpty($value, $message = '') @method static void nullOrTrue($value, $message = '') @method static void nullOrFalse($value, $message = '') @method static void nullOrIp($value, $message = '') @method static void nullOrIpv4($value, $message = '') @method static void nullOrIpv6($value, $message = '') @method static void nullOrEmail($value, $message = '') @method static void nullOrUniqueValues($values, $message = '') @method static void nullOrEq($value, $expect, $message = '') @method static void nullOrNotEq($value, $expect, $message = '') @method static void nullOrSame($value, $expect, $message = '') @method static void nullOrNotSame($value, $expect, $message = '') @method static void nullOrGreaterThan($value, $limit, $message = '') @method static void nullOrGreaterThanEq($value, $limit, $message = '') @method static void nullOrLessThan($value, $limit, $message = '') @method static void nullOrLessThanEq($value, $limit, $message = '') @method static void nullOrRange($value, $min, $max, $message = '') @method static void nullOrOneOf($value, $values, $message = '') @method static void nullOrContains($value, $subString, $message = '') @method static void nullOrNotContains($value, $subString, $message = '') @method static void nullOrNotWhitespaceOnly($value, $message = '') @method static void nullOrStartsWith($value, $prefix, $message = '') @method static void nullOrStartsWithLetter($value, $message = '') @method static void nullOrEndsWith($value, $suffix, $message = '') @method static void nullOrRegex($value, $pattern, $message = '') @method static void nullOrNotRegex($value, $pattern, $message = '') @method static void nullOrUnicodeLetters($value, $message = '') @method static void nullOrAlpha($value, $message = '') @method static void nullOrDigits($value, $message = '') @method static void nullOrAlnum($value, $message = '') @method static void nullOrLower($value, $message = '') @method static void nullOrUpper($value, $message = '') @method static void nullOrLength($value, $length, $message = '') @method static void nullOrMinLength($value, $min, $message = '') @method static void nullOrMaxLength($value, $max, $message = '') @method static void nullOrLengthBetween($value, $min, $max, $message = '') @method static void nullOrFileExists($value, $message = '') @method static void nullOrFile($value, $message = '') @method static void nullOrDirectory($value, $message = '') @method static void nullOrReadable($value, $message = '') @method static void nullOrWritable($value, $message = '') @method static void nullOrClassExists($value, $message = '') @method static void nullOrSubclassOf($value, $class, $message = '') @method static void nullOrInterfaceExists($value, $message = '') @method static void nullOrImplementsInterface($value, $interface, $message = '') @method static void nullOrPropertyExists($value, $property, $message = '') @method static void nullOrPropertyNotExists($value, $property, $message = '') @method static void nullOrMethodExists($value, $method, $message = '') @method static void nullOrMethodNotExists($value, $method, $message = '') @method static void nullOrKeyExists($value, $key, $message = '') @method static void nullOrKeyNotExists($value, $key, $message = '') @method static void nullOrValidArrayKey($value, $message = '') @method static void nullOrCount($value, $key, $message = '') @method static void nullOrMinCount($value, $min, $message = '') @method static void nullOrMaxCount($value, $max, $message = '') @method static void nullOrIsList($value, $message = '') @method static void nullOrIsNonEmptyList($value, $message = '') @method static void nullOrIsMap($value, $message = '') @method static void nullOrIsNonEmptyMap($value, $message = '') @method static void nullOrCountBetween($value, $min, $max, $message = '') @method static void nullOrUuid($values, $message = '') @method static void nullOrThrows($expression, $class = 'Exception', $message = '') @method static void allString($values, $message = '') @method static void allStringNotEmpty($values, $message = '') @method static void allInteger($values, $message = '') @method static void allIntegerish($values, $message = '') @method static void allFloat($values, $message = '') @method static void allNumeric($values, $message = '') @method static void allNatural($values, $message = '') @method static void allBoolean($values, $message = '') @method static void allScalar($values, $message = '') @method static void allObject($values, $message = '') @method static void allResource($values, $type = null, $message = '') @method static void allIsCallable($values, $message = '') @method static void allIsArray($values, $message = '') @method static void allIsTraversable($values, $message = '') @method static void allIsArrayAccessible($values, $message = '') @method static void allIsCountable($values, $message = '') @method static void allIsIterable($values, $message = '') @method static void allIsInstanceOf($values, $class, $message = '') @method static void allNotInstanceOf($values, $class, $message = '') @method static void allIsInstanceOfAny($values, $classes, $message = '') @method static void allNull($values, $message = '') @method static void allNotNull($values, $message = '') @method static void allIsEmpty($values, $message = '') @method static void allNotEmpty($values, $message = '') @method static void allTrue($values, $message = '') @method static void allFalse($values, $message = '') @method static void allIp($values, $message = '') @method static void allIpv4($values, $message = '') @method static void allIpv6($values, $message = '') @method static void allEmail($values, $message = '') @method static void allUniqueValues($values, $message = '') @method static void allEq($values, $expect, $message = '') @method static void allNotEq($values, $expect, $message = '') @method static void allSame($values, $expect, $message = '') @method static void allNotSame($values, $expect, $message = '') @method static void allGreaterThan($values, $limit, $message = '') @method static void allGreaterThanEq($values, $limit, $message = '') @method static void allLessThan($values, $limit, $message = '') @method static void allLessThanEq($values, $limit, $message = '') @method static void allRange($values, $min, $max, $message = '') @method static void allOneOf($values, $values, $message = '') @method static void allContains($values, $subString, $message = '') @method static void allNotContains($values, $subString, $message = '') @method static void allNotWhitespaceOnly($values, $message = '') @method static void allStartsWith($values, $prefix, $message = '') @method static void allStartsWithLetter($values, $message = '') @method static void allEndsWith($values, $suffix, $message = '') @method static void allRegex($values, $pattern, $message = '') @method static void allNotRegex($values, $pattern, $message = '') @method static void allUnicodeLetters($values, $message = '') @method static void allAlpha($values, $message = '') @method static void allDigits($values, $message = '') @method static void allAlnum($values, $message = '') @method static void allLower($values, $message = '') @method static void allUpper($values, $message = '') @method static void allLength($values, $length, $message = '') @method static void allMinLength($values, $min, $message = '') @method static void allMaxLength($values, $max, $message = '') @method static void allLengthBetween($values, $min, $max, $message = '') @method static void allFileExists($values, $message = '') @method static void allFile($values, $message = '') @method static void allDirectory($values, $message = '') @method static void allReadable($values, $message = '') @method static void allWritable($values, $message = '') @method static void allClassExists($values, $message = '') @method static void allSubclassOf($values, $class, $message = '') @method static void allInterfaceExists($values, $message = '') @method static void allImplementsInterface($values, $interface, $message = '') @method static void allPropertyExists($values, $property, $message = '') @method static void allPropertyNotExists($values, $property, $message = '') @method static void allMethodExists($values, $method, $message = '') @method static void allMethodNotExists($values, $method, $message = '') @method static void allKeyExists($values, $key, $message = '') @method static void allKeyNotExists($values, $key, $message = '') @method static void allValidArrayKey($values, $message = '') @method static void allCount($values, $key, $message = '') @method static void allMinCount($values, $min, $message = '') @method static void allMaxCount($values, $max, $message = '') @method static void allCountBetween($values, $min, $max, $message = '') @method static void allIsList($values, $message = '') @method static void allIsNonEmptyList($values, $message = '') @method static void allIsMap($values, $message = '') @method static void allIsNonEmptyMap($values, $message = '') @method static void allUuid($values, $message = '') @method static void allThrows($expressions, $class = 'Exception', $message = '')

Depuis
1.0
Auteur
Bernhard Schussek bschu.nosp@m.ssek.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( )
private

Documentation des fonctions membres

◆ __callStatic()

static __callStatic (   $name,
  $arguments 
)
static
Exceptions
BadMethodCallException

◆ alnum()

static alnum (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ alpha()

static alpha (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ boolean()

static boolean (   $value,
  $message = '' 
)
static

@psalm-assert bool $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ classExists()

static classExists (   $value,
  $message = '' 
)
static

@psalm-assert class-string $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ contains()

static contains (   $value,
  $subString,
  $message = '' 
)
static
Paramètres
mixed$value
string$subString
string$message
Exceptions
InvalidArgumentException

◆ count()

static count (   $array,
  $number,
  $message = '' 
)
static

Does not check if $array is countable, this can generate a warning on php versions after 7.2.

Paramètres
mixed$array
mixed$number
string$message
Exceptions
InvalidArgumentException
+ Voici le graphe des appelants de cette fonction :

◆ countBetween()

static countBetween (   $array,
  $min,
  $max,
  $message = '' 
)
static

Does not check if $array is countable, this can generate a warning on php versions after 7.2.

Paramètres
mixed$array
mixed$min
mixed$max
string$message
Exceptions
InvalidArgumentException
+ Voici le graphe d'appel pour cette fonction :

◆ digits()

static digits (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ directory()

static directory (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ email()

static email (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ endsWith()

static endsWith (   $value,
  $suffix,
  $message = '' 
)
static
Paramètres
mixed$value
string$suffix
string$message
Exceptions
InvalidArgumentException
+ Voici le graphe d'appel pour cette fonction :

◆ eq()

static eq (   $value,
  $expect,
  $message = '' 
)
static
Paramètres
mixed$value
mixed$expect
string$message
Exceptions
InvalidArgumentException

◆ false()

static false (   $value,
  $message = '' 
)
static

@psalm-assert false $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ file()

static file (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ fileExists()

static fileExists (   $value,
  $message = '' 
)
static

Will also pass if $value is a directory, use Assert::file() instead if you need to be sure it is a file.

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ float()

static float (   $value,
  $message = '' 
)
static

@psalm-assert float $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ greaterThan()

static greaterThan (   $value,
  $limit,
  $message = '' 
)
static
Paramètres
mixed$value
mixed$limit
string$message
Exceptions
InvalidArgumentException

◆ greaterThanEq()

static greaterThanEq (   $value,
  $limit,
  $message = '' 
)
static
Paramètres
mixed$value
mixed$limit
string$message
Exceptions
InvalidArgumentException

◆ implementsInterface()

static implementsInterface (   $value,
  $interface,
  $message = '' 
)
static
Paramètres
mixed$value
mixed$interface
string$message
Exceptions
InvalidArgumentException

◆ integer()

static integer (   $value,
  $message = '' 
)
static

@psalm-assert int $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ integerish()

static integerish (   $value,
  $message = '' 
)
static

@psalm-assert numeric $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ interfaceExists()

static interfaceExists (   $value,
  $message = '' 
)
static

@psalm-assert class-string $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ ip()

static ip (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ ipv4()

static ipv4 (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ ipv6()

static ipv6 (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isArray()

static isArray (   $value,
  $message = '' 
)
static

@psalm-assert array $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isArrayAccessible()

static isArrayAccessible (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isCallable()

static isCallable (   $value,
  $message = '' 
)
static

@psalm-assert callable $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isCountable()

static isCountable (   $value,
  $message = '' 
)
static

@psalm-assert countable $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isEmpty()

static isEmpty (   $value,
  $message = '' 
)
static

@psalm-assert empty $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isInstanceOf()

static isInstanceOf (   $value,
  $class,
  $message = '' 
)
static

@psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $class @psalm-assert ExpectedType $value

Paramètres
mixed$value
string | object$class
string$message
Exceptions
InvalidArgumentException

◆ isInstanceOfAny()

static isInstanceOfAny (   $value,
array  $classes,
  $message = '' 
)
static
Paramètres
mixed$value
array<object|string>$classes
string$message
Exceptions
InvalidArgumentException

◆ isIterable()

static isIterable (   $value,
  $message = '' 
)
static

@psalm-assert iterable $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isList()

static isList (   $array,
  $message = '' 
)
static

@psalm-assert list $array

Paramètres
mixed$array
string$message
Exceptions
InvalidArgumentException

◆ isMap()

static isMap (   $array,
  $message = '' 
)
static
Paramètres
mixed$array
string$message
Exceptions
InvalidArgumentException

◆ isNonEmptyList()

static isNonEmptyList (   $array,
  $message = '' 
)
static

@psalm-assert non-empty-list $array

Paramètres
mixed$array
string$message
Exceptions
InvalidArgumentException

◆ isNonEmptyMap()

static isNonEmptyMap (   $array,
  $message = '' 
)
static
Paramètres
mixed$array
string$message
Exceptions
InvalidArgumentException

◆ isTraversable()

static isTraversable (   $value,
  $message = '' 
)
static

@psalm-assert iterable $value

Obsolète:
use "isIterable" or "isInstanceOf" instead
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ keyExists()

static keyExists (   $array,
  $key,
  $message = '' 
)
static
Paramètres
array$array
string | int$key
string$message
Exceptions
InvalidArgumentException

◆ keyNotExists()

static keyNotExists (   $array,
  $key,
  $message = '' 
)
static
Paramètres
array$array
string | int$key
string$message
Exceptions
InvalidArgumentException

◆ length()

static length (   $value,
  $length,
  $message = '' 
)
static
Paramètres
mixed$value
mixed$length
string$message
Exceptions
InvalidArgumentException

◆ lengthBetween()

static lengthBetween (   $value,
  $min,
  $max,
  $message = '' 
)
static

Inclusive , so Assert::lengthBetween('asd', 3, 5); passes the assertion.

Paramètres
mixed$value
mixed$min
mixed$max
string$message
Exceptions
InvalidArgumentException

◆ lessThan()

static lessThan (   $value,
  $limit,
  $message = '' 
)
static
Paramètres
mixed$value
mixed$limit
string$message
Exceptions
InvalidArgumentException

◆ lessThanEq()

static lessThanEq (   $value,
  $limit,
  $message = '' 
)
static
Paramètres
mixed$value
mixed$limit
string$message
Exceptions
InvalidArgumentException

◆ lower()

static lower (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ maxCount()

static maxCount (   $array,
  $max,
  $message = '' 
)
static

Does not check if $array is countable, this can generate a warning on php versions after 7.2.

Paramètres
mixed$array
mixed$max
string$message
Exceptions
InvalidArgumentException
+ Voici le graphe d'appel pour cette fonction :

◆ maxLength()

static maxLength (   $value,
  $max,
  $message = '' 
)
static

Inclusive max.

Paramètres
mixed$value
mixed$max
string$message
Exceptions
InvalidArgumentException

◆ methodExists()

static methodExists (   $classOrObject,
  $method,
  $message = '' 
)
static
Paramètres
string | object$classOrObject
mixed$method
string$message
Exceptions
InvalidArgumentException

◆ methodNotExists()

static methodNotExists (   $classOrObject,
  $method,
  $message = '' 
)
static
Paramètres
string | object$classOrObject
mixed$method
string$message
Exceptions
InvalidArgumentException

◆ minCount()

static minCount (   $array,
  $min,
  $message = '' 
)
static

Does not check if $array is countable, this can generate a warning on php versions after 7.2.

Paramètres
mixed$array
mixed$min
string$message
Exceptions
InvalidArgumentException
+ Voici le graphe d'appel pour cette fonction :

◆ minLength()

static minLength (   $value,
  $min,
  $message = '' 
)
static

Inclusive min.

Paramètres
mixed$value
mixed$min
string$message
Exceptions
InvalidArgumentException

◆ natural()

static natural (   $value,
  $message = '' 
)
static

@psalm-assert int $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ notContains()

static notContains (   $value,
  $subString,
  $message = '' 
)
static
Paramètres
mixed$value
string$subString
string$message
Exceptions
InvalidArgumentException

◆ notEmpty()

static notEmpty (   $value,
  $message = '' 
)
static

@psalm-assert !empty $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ notEq()

static notEq (   $value,
  $expect,
  $message = '' 
)
static
Paramètres
mixed$value
mixed$expect
string$message
Exceptions
InvalidArgumentException

◆ notInstanceOf()

static notInstanceOf (   $value,
  $class,
  $message = '' 
)
static

@psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $class @psalm-assert !ExpectedType $value

Paramètres
mixed$value
string | object$class
string$message
Exceptions
InvalidArgumentException

◆ notNull()

static notNull (   $value,
  $message = '' 
)
static

@psalm-assert !null $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ notRegex()

static notRegex (   $value,
  $pattern,
  $message = '' 
)
static
Paramètres
mixed$value
mixed$pattern
string$message
Exceptions
InvalidArgumentException

◆ notSame()

static notSame (   $value,
  $expect,
  $message = '' 
)
static
Paramètres
mixed$value
mixed$expect
string$message
Exceptions
InvalidArgumentException

◆ notWhitespaceOnly()

static notWhitespaceOnly (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ null()

static null (   $value,
  $message = '' 
)
static

@psalm-assert null $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ numeric()

static numeric (   $value,
  $message = '' 
)
static

@psalm-assert numeric $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ object()

static object (   $value,
  $message = '' 
)
static

@psalm-assert object $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ oneOf()

static oneOf (   $value,
array  $values,
  $message = '' 
)
static

Does strict comparison, so Assert::oneOf(3, ['3']) does not pass the assertion.

Paramètres
mixed$value
array$values
string$message
Exceptions
InvalidArgumentException

◆ propertyExists()

static propertyExists (   $classOrObject,
  $property,
  $message = '' 
)
static
Paramètres
string | object$classOrObject
mixed$property
string$message
Exceptions
InvalidArgumentException

◆ propertyNotExists()

static propertyNotExists (   $classOrObject,
  $property,
  $message = '' 
)
static
Paramètres
string | object$classOrObject
mixed$property
string$message
Exceptions
InvalidArgumentException

◆ range()

static range (   $value,
  $min,
  $max,
  $message = '' 
)
static

Inclusive range, so Assert::(3, 3, 5) passes.

Paramètres
mixed$value
mixed$min
mixed$max
string$message
Exceptions
InvalidArgumentException

◆ readable()

static readable (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ regex()

static regex (   $value,
  $pattern,
  $message = '' 
)
static
Paramètres
mixed$value
mixed$pattern
string$message
Exceptions
InvalidArgumentException

◆ reportInvalidArgument()

static reportInvalidArgument (   $message)
staticprotected
Paramètres
string$message
Exceptions
InvalidArgumentException

◆ resource()

static resource (   $value,
  $type = null,
  $message = '' 
)
static

@psalm-assert resource $value

Paramètres
mixed$value
string | null$typetype of resource this should be.
Voir également
https://www.php.net/manual/en/function.get-resource-type.php
Paramètres
string$message
Exceptions
InvalidArgumentException

◆ same()

static same (   $value,
  $expect,
  $message = '' 
)
static
Paramètres
mixed$value
mixed$expect
string$message
Exceptions
InvalidArgumentException

◆ scalar()

static scalar (   $value,
  $message = '' 
)
static

@psalm-assert scalar $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ startsWith()

static startsWith (   $value,
  $prefix,
  $message = '' 
)
static
Paramètres
mixed$value
string$prefix
string$message
Exceptions
InvalidArgumentException

◆ startsWithLetter()

static startsWithLetter (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ string()

static string (   $value,
  $message = '' 
)
static

@psalm-assert string $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ stringNotEmpty()

static stringNotEmpty (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ strlen()

static strlen (   $value)
staticprotected
+ Voici le graphe des appelants de cette fonction :

◆ subclassOf()

static subclassOf (   $value,
  $class,
  $message = '' 
)
static
Paramètres
mixed$value
string | object$class
string$message
Exceptions
InvalidArgumentException

◆ throws()

static throws ( Closure  $expression,
  $class = 'Exception',
  $message = '' 
)
static
Paramètres
Closure$expression
string | object$class
string$message
Exceptions
InvalidArgumentException

◆ true()

static true (   $value,
  $message = '' 
)
static

@psalm-assert true $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ typeToString()

static typeToString (   $value)
staticprotected
Paramètres
mixed$value
Renvoie
string

◆ unicodeLetters()

static unicodeLetters (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ uniqueValues()

static uniqueValues ( array  $values,
  $message = '' 
)
static

Does non strict comparisons on the items, so ['3', 3] will not pass the assertion.

Paramètres
array$values
string$message
Exceptions
InvalidArgumentException
+ Voici le graphe d'appel pour cette fonction :

◆ upper()

static upper (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ uuid()

static uuid (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ validArrayKey()

static validArrayKey (   $value,
  $message = '' 
)
static

Checks if a value is a valid array key (int or string).

@psalm-assert array-key $value

Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ valueToString()

static valueToString (   $value)
staticprotected
Paramètres
mixed$value
Renvoie
string

◆ writable()

static writable (   $value,
  $message = '' 
)
static
Paramètres
mixed$value
string$message
Exceptions
InvalidArgumentException

La documentation de cette classe a été générée à partir du fichier suivant :