Methods summary
Modifier and Type | Method |
---|---|
protected | __construct ( string typeName = null , string allowsNull = true , TypeConstraint arrayFieldTypeConstraints = null , array whitelistTypes = array ) |
public string | getTypeName ( ) |
public | isArrayLike ( ) |
public boolean | allowsNull ( ) |
public TypeConstraint | getArrayFieldTypeConstraint ( ) |
public | isValueValid ( unknown value ) |
public | validate ( mixed value ) |
public | isEmpty ( ) |
public | isPassableTo ( TypeConstraint constraints , unknown ignoreNullAllowed = false ) |
public | isPassableBy ( TypeConstraint constraints , unknown ignoreNullAllowed = false ) |
public | getLenientCopy ( ) |
public | __toString ( ) |
public static TypeConstraint | createFromParameter ( ReflectionParameter parameter ) |
public static | createSimple ( unknown type , bool allowsNull = true , array whitelistTypes = array ) |
public static | createArrayLike ( unknown type , bool allowsNull = true , TypeConstraint arrayFieldTypeConstraints = null , array whitelistTypes = array ) |
public static | isValueA ( unknown value , unknown expectedType , bool nullAllowed ) |
public static | isTypeA ( unknown type , unknown expectedType ) |
Methods in detail
-
__construct
protected __construct ( string typeName = null , string allowsNull = true , TypeConstraint arrayFieldTypeConstraints = null , array whitelistTypes = array ) -
getTypeName
string public getTypeName ( )return
string -
isArrayLike
public isArrayLike ( ) -
allowsNull
boolean public allowsNull ( )return
boolean -
getArrayFieldTypeConstraint
TypeConstraint public getArrayFieldTypeConstraint ( )return
-
isValueValid
public isValueValid ( unknown value ) -
validate
public validate ( mixed value ) -
isEmpty
public isEmpty ( ) -
isPassableTo
Returns true if all values which are compatible with the constraints of this instance are also compatible with the passed constraints (but not necessary the other way around)param
-
isPassableBy
-
getLenientCopy
public getLenientCopy ( ) -
__toString
public __toString ( ) -
createFromParameter
-
createSimple
public static createSimple ( unknown type , bool allowsNull = true , array whitelistTypes = array ) -
createArrayLike
public static createArrayLike ( unknown type , bool allowsNull = true , TypeConstraint arrayFieldTypeConstraints = null , array whitelistTypes = array ) -
isValueA
public static isValueA ( unknown value , unknown expectedType , bool nullAllowed ) -
isTypeA
public static isTypeA ( unknown type , unknown expectedType )
param
throws