PHP 클래스 Neos\Flow\Validation\Validator\GenericObjectValidator

상속: extends AbstractValidator, implements Neos\Flow\Validation\Validator\ObjectValidatorInterface
파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$propertyValidators array
$validatedInstancesContainer SplObjectStorage

공개 메소드들

메소드 설명
addPropertyValidator ( string $propertyName, Neos\Flow\Validation\Validator\ValidatorInterface $validator ) : void Adds the given validator for validation of the specified property.
getPropertyValidators ( string $propertyName = null ) : array Returns all property validators - or only validators of the specified property
setValidatedInstancesContainer ( SplObjectStorage $validatedInstancesContainer ) : void Allows to set a container to keep track of validated instances.
validate ( mixed $value ) : Neos\Error\Messages\Result Checks if the given value is valid according to the validator, and returns the Error Messages object which occurred.

보호된 메소드들

메소드 설명
checkProperty ( mixed $value, array $validators ) : null | Neos\Error\Messages\Result Checks if the specified property of the given object is valid, and adds found errors to the $messages object.
getPropertyValue ( object $object, string $propertyName ) : mixed Load the property value to be used for validation.
isValid ( mixed $object ) : void Checks if the given value is valid according to the property validators.
isValidatedAlready ( object $object ) : boolean

메소드 상세

addPropertyValidator() 공개 메소드

Adds the given validator for validation of the specified property.
public addPropertyValidator ( string $propertyName, Neos\Flow\Validation\Validator\ValidatorInterface $validator ) : void
$propertyName string Name of the property to validate
$validator Neos\Flow\Validation\Validator\ValidatorInterface The property validator
리턴 void

checkProperty() 보호된 메소드

Checks if the specified property of the given object is valid, and adds found errors to the $messages object.
protected checkProperty ( mixed $value, array $validators ) : null | Neos\Error\Messages\Result
$value mixed The value to be validated
$validators array The validators to be called on the value
리턴 null | Neos\Error\Messages\Result

getPropertyValidators() 공개 메소드

Returns all property validators - or only validators of the specified property
public getPropertyValidators ( string $propertyName = null ) : array
$propertyName string Name of the property to return validators for
리턴 array An array of validators

getPropertyValue() 보호된 메소드

In case the object is a doctrine proxy, we need to load the real instance first.
protected getPropertyValue ( object $object, string $propertyName ) : mixed
$object object
$propertyName string
리턴 mixed

isValid() 보호된 메소드

Checks if the given value is valid according to the property validators.
protected isValid ( mixed $object ) : void
$object mixed The value that should be validated
리턴 void

isValidatedAlready() 보호된 메소드

protected isValidatedAlready ( object $object ) : boolean
$object object
리턴 boolean

setValidatedInstancesContainer() 공개 메소드

Allows to set a container to keep track of validated instances.
public setValidatedInstancesContainer ( SplObjectStorage $validatedInstancesContainer ) : void
$validatedInstancesContainer SplObjectStorage A container to keep track of validated instances
리턴 void

validate() 공개 메소드

Checks if the given value is valid according to the validator, and returns the Error Messages object which occurred.
public validate ( mixed $value ) : Neos\Error\Messages\Result
$value mixed The value that should be validated
리턴 Neos\Error\Messages\Result

프로퍼티 상세

$propertyValidators 보호되어 있는 프로퍼티

protected array $propertyValidators
리턴 array

$validatedInstancesContainer 보호되어 있는 프로퍼티

protected SplObjectStorage $validatedInstancesContainer
리턴 SplObjectStorage