public function addPropertyValidator($propertyName, ValidatorInterface $validator)
    {
        if (!isset($this->propertyValidators[$propertyName])) {
            $this->propertyValidators[$propertyName] = new \SplObjectStorage();
        }
        $this->propertyValidators[$propertyName]->attach($validator);
    }
public function addPropertyValidator($propertyName, ValidatorInterface $validator)
    {
        if (!isset($this->propertyValidators[$propertyName])) {
            $this->propertyValidators[$propertyName] = new \SplObjectStorage();
        }
        $this->propertyValidators[$propertyName]->attach($validator);
    }
public function addPropertyValidator ( $ propertyName , ValidatorInterface $ validator ) { if ( ! isset ( $ this -> propertyValidators [ $ propertyName ] ) ) { $ this -> propertyValidators [ $ propertyName ] = new \ SplObjectStorage ( ) ; } $ this -> propertyValidators [ $ propertyName ] -> attach ( $ validator ) ; }
Adds the given validator for validation of the specified property.

@param string $propertyName Name of the property to validate
@param ValidatorInterface $validator The property validator
@return void
@api
Adds the given validator for validation of the specified property .