lib/Accessible/AutomatedBehaviorTrait.php
protected function assertPropertyValue($property, $value)
    {
        $this->getPropertiesInfo();

        if ($this->_constraintsValidationEnabled) {
            $constraintsViolations = ConstraintsReader::validatePropertyValue($this, $property, $value);
            if ($constraintsViolations->count()) {
                $errorMessage = "Argument given is invalid; its constraints validation failed for property $property with the following messages: \"";
                $errorMessageList = array();
                foreach ($constraintsViolations as $violation) {
                    $errorMessageList[] = $violation->getMessage();
                }
                $errorMessage .= implode("\", \n\"", $errorMessageList) . "\".";

                throw new \InvalidArgumentException($errorMessage);
            }
        }
    }
protected function assertPropertyValue($property, $value)
    {
        $this->getPropertiesInfo();

        if ($this->_constraintsValidationEnabled) {
            $constraintsViolations = ConstraintsReader::validatePropertyValue($this, $property, $value);
            if ($constraintsViolations->count()) {
                $errorMessage = "Argument given is invalid; its constraints validation failed for property $property with the following messages: \"";
                $errorMessageList = array();
                foreach ($constraintsViolations as $violation) {
                    $errorMessageList[] = $violation->getMessage();
                }
                $errorMessage .= implode("\", \n\"", $errorMessageList) . "\".";

                throw new \InvalidArgumentException($errorMessage);
            }
        }
    }
protected function assertPropertyValue ( $ property , $ value ) { $ this -> getPropertiesInfo ( ) ; if ( $ this -> _constraintsValidationEnabled ) { $ constraintsViolations = ConstraintsReader :: validatePropertyValue ( $ this , $ property , $ value ) ; if ( $ constraintsViolations -> count ( ) ) { $ errorMessage = "Argument given is invalid; its constraints validation failed for property $property with the following messages: \"" ; $ errorMessageList = array ( ) ; foreach ( $ constraintsViolations as $ violation ) { $ errorMessageList [ ] = $ violation -> getMessage ( ) ; } $ errorMessage .= implode ( "\", \n\"" , $ errorMessageList ) . "\"." ; throw new \ InvalidArgumentException ( $ errorMessage ) ; } } }
Validates the given value compared to given property constraints.
If the value is not valid, an InvalidArgumentException will be thrown.

@param  string $property The name of the reference property.
@param  mixed  $value    The value to check.

@throws \InvalidArgumentException If the value is not valid.
Validates the given value compared to given property constraints . If the value is not valid an InvalidArgumentException will be thrown .