PHP Class Assert\InvalidArgumentException

Inheritance: extends InvalidArgumentException, implements assert\AssertionFailedException
Datei anzeigen Open project: beberlei/assert Class Usage Examples

Public Methods

Method Description
__construct ( $message, $code, $propertyPath = null, $value, array $constraints = [] )
getConstraints ( ) : array Get the constraints that applied to the failed assertion.
getPropertyPath ( ) : string User controlled way to define a sub-property causing the failure of a currently asserted objects.
getValue ( ) : mixed Get the value that caused the assertion to fail.

Method Details

__construct() public method

public __construct ( $message, $code, $propertyPath = null, $value, array $constraints = [] )
$constraints array

getConstraints() public method

Get the constraints that applied to the failed assertion.
public getConstraints ( ) : array
return array

getPropertyPath() public method

Useful to transport information about the nature of the error back to higher layers.
public getPropertyPath ( ) : string
return string

getValue() public method

Get the value that caused the assertion to fail.
public getValue ( ) : mixed
return mixed