Class Args
Generic helper class for validating method arguments
Methods summary
public static
|
#
callBack( mixed $object, $argName )
Throws and excpetion if not a callback
Throws and excpetion if not a callback
Parameters
- $object
mixed The object to test
- $argName
|
public static
|
#
callBackArgs( Closure $callback, integer $amount, $argName )
Throws an exception if the callback does not accept the required number of
arguments
Throws an exception if the callback does not accept the required number of
arguments
Parameters
- $callback
Closure
The callback to test
- $amount
integer The number of arguments the callback should have
- $argName
|
public static
|
#
isNumeric( type $number, $argName )
Throws an exception if not numeric
Throws an exception if not numeric
Parameters
|
public static
|
#
isArray( type $object, type $argName )
Throw an exception if the object is not an array
Throw an exception if the object is not an array
Parameters
- $object
type
- $argName
type
|
public static
|
#
isString( type $object, type $argName )
Throw an exception if the object is not a string
Throw an exception if the object is not a string
Parameters
- $object
type
- $argName
type
|
public static
|
#
isBoolean( type $object, type $argName )
Throw an exception if the object is not a boolean
Throw an exception if the object is not a boolean
Parameters
- $object
type
- $argName
type
|
public static
|
#
notNull( type $object, type $argName )
Throw an exception if the object is null
Throw an exception if the object is null
Parameters
- $object
type
- $argName
type
|
public static
|
#
identifierOf( picon\Identifier $object, picon\Identifier $expected, type $argName )
Throw an exception if the object identifier is not a subclass or implementer
of expected
Throw an exception if the object identifier is not a subclass or implementer
of expected
Parameters
|