src/Validation/Validation.php
private function getValidators($annotations, $class)
    {
        $validators = [];
        $it = $this->getAnnotations()->filter($annotations)
            ->is(ValidatorInterface::class)
            ->onProperties();
        foreach ($it as $annotation) {
            $property = $annotation->getPropertyName();
            if (!isset($validators[$property])) {
                $validators[$property] = [
                    'required' => false,
                    'validators' => [],
                ];
            }
            $validators[$property]['validators'][] = $annotation->getValidator($this);
            if ($annotation instanceof Required) {
                $validators[$property]['required'] = true;
            }
        }
        return $validators;
    }
private function getValidators($annotations, $class)
    {
        $validators = [];
        $it = $this->getAnnotations()->filter($annotations)
            ->is(ValidatorInterface::class)
            ->onProperties();
        foreach ($it as $annotation) {
            $property = $annotation->getPropertyName();
            if (!isset($validators[$property])) {
                $validators[$property] = [
                    'required' => false,
                    'validators' => [],
                ];
            }
            $validators[$property]['validators'][] = $annotation->getValidator($this);
            if ($annotation instanceof Required) {
                $validators[$property]['required'] = true;
            }
        }
        return $validators;
    }
private function getValidators ( $ annotations , $ class ) { $ validators = [ ] ; $ it = $ this -> getAnnotations ( ) -> filter ( $ annotations ) -> is ( ValidatorInterface :: class ) -> onProperties ( ) ; foreach ( $ it as $ annotation ) { $ property = $ annotation -> getPropertyName ( ) ; if ( ! isset ( $ validators [ $ property ] ) ) { $ validators [ $ property ] = [ 'required' => false , 'validators' => [ ] , ] ; } $ validators [ $ property ] [ 'validators' ] [ ] = $ annotation -> getValidator ( $ this ) ; if ( $ annotation instanceof Required ) { $ validators [ $ property ] [ 'required' ] = true ; } } return $ validators ; }
Gets all validators

@return array
Gets all validators