Neos\Flow\Validation\Validator\CollectionValidator::validate PHP Метод

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
    public function validate($value)
    {
        $this->result = new ErrorResult();
        if ($this->acceptsEmptyValues === false || $this->isEmpty($value) === false) {
            if ($value instanceof \Doctrine\ORM\PersistentCollection && !$value->isInitialized()) {
                return $this->result;
            } elseif (is_object($value) && !TypeHandling::isCollectionType(get_class($value)) && !is_array($value)) {
                $this->addError('The given subject was not a collection.', 1317204797);
                return $this->result;
            } elseif (is_object($value) && $this->isValidatedAlready($value)) {
                return $this->result;
            } else {
                $this->isValid($value);
            }
        }
        return $this->result;
    }
CollectionValidator