Свойство | Тип | Описание | |
---|---|---|---|
$baseValidatorConjunctions | array | ||
$objectManager | Neos\Flow\ObjectManagement\ObjectManagerInterface | ||
$reflectionService |
Метод | Описание | |
---|---|---|
buildMethodArgumentsValidatorConjunctions ( string $className, string $methodName, array $methodParameters = null, array $methodValidateAnnotations = null ) : array | Detects and registers any validators for arguments: - by the data type specified in the param annotations - additional validators specified in the validate annotations of a method | |
createValidator ( string $validatorType, array $validatorOptions = [] ) : Neos\Flow\Validation\Validator\ValidatorInterface | Get a validator for a given data type. Returns a validator implementing the ValidatorInterface or NULL if no validator could be resolved. | |
getBaseValidatorConjunction ( string $targetClassName, array $validationGroups = ['Default'] ) : |
Resolves and returns the base validator conjunction for the given data type. | |
getPolyTypeObjectValidatorImplementationClassNames ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : array | Returns a map of object validator class names. | |
getValidatorImplementationClassNames ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : array | Returns all class names implementing the ValidatorInterface. | |
reset ( ) : void | Resets the baseValidatorConjunctions It is usually not required to reset the ValidatorResolver during one request. This method is mainly useful for functional tests |
Метод | Описание | |
---|---|---|
addCustomValidators ( string $targetClassName, |
This adds custom validators to the passed $conjunctionValidator. | |
buildBaseValidatorConjunction ( string $indexKey, string $targetClassName, array $validationGroups ) : void | Builds a base validator conjunction for the given data type. | |
buildSubObjectValidator ( array $objectPath, Neos\Flow\Validation\Validator\ValidatorInterface $propertyValidator ) : |
Builds a chain of nested object validators by specification of the given object path. | |
getValidatorType ( string $type ) : string | Used to map PHP types to validator types. | |
resolveValidatorObjectName ( string $validatorType ) : string | boolean | Returns the class name of an appropriate validator for the given type. If no validator is available FALSE is returned |
protected addCustomValidators ( string $targetClassName, |
||
$targetClassName | string | |
$conjunctionValidator | ||
Результат | null | Neos\Flow\Validation\Validator\ObjectValidatorInterface |
protected buildBaseValidatorConjunction ( string $indexKey, string $targetClassName, array $validationGroups ) : void | ||
$indexKey | string | The key to use as index in $this->baseValidatorConjunctions; calculated from target class name and validation groups |
$targetClassName | string | The data type to build the validation conjunction for. Needs to be the fully qualified class name. |
$validationGroups | array | The validation groups to build the validator for |
Результат | void |
public buildMethodArgumentsValidatorConjunctions ( string $className, string $methodName, array $methodParameters = null, array $methodValidateAnnotations = null ) : array | ||
$className | string | |
$methodName | string | |
$methodParameters | array | Optional pre-compiled array of method parameters |
$methodValidateAnnotations | array | Optional pre-compiled array of validate annotations (as array) |
Результат | array | An Array of ValidatorConjunctions for each method parameters. |
protected buildSubObjectValidator ( array $objectPath, Neos\Flow\Validation\Validator\ValidatorInterface $propertyValidator ) : |
||
$objectPath | array | The object path |
$propertyValidator | Neos\Flow\Validation\Validator\ValidatorInterface | The validator which should be added to the property specified by objectPath |
Результат |
public createValidator ( string $validatorType, array $validatorOptions = [] ) : Neos\Flow\Validation\Validator\ValidatorInterface | ||
$validatorType | string | Either one of the built-in data types or fully qualified validator class name |
$validatorOptions | array | Options to be passed to the validator |
Результат | Neos\Flow\Validation\Validator\ValidatorInterface |
public getBaseValidatorConjunction ( string $targetClassName, array $validationGroups = ['Default'] ) : |
||
$targetClassName | string | Fully qualified class name of the target class, ie. the class which should be validated |
$validationGroups | array | The validation groups to build the validator for |
Результат | The validator conjunction |
public static getPolyTypeObjectValidatorImplementationClassNames ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : array | ||
$objectManager | Neos\Flow\ObjectManagement\ObjectManagerInterface | |
Результат | array | Array of object validator class names |
public static getValidatorImplementationClassNames ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : array | ||
$objectManager | Neos\Flow\ObjectManagement\ObjectManagerInterface | |
Результат | array | Array of class names implementing ValidatorInterface indexed by class name |
protected getValidatorType ( string $type ) : string | ||
$type | string | Data type to unify |
Результат | string | unified data type |
protected array $baseValidatorConjunctions | ||
Результат | array |
protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager | ||
Результат | Neos\Flow\ObjectManagement\ObjectManagerInterface |