protected function getValidatorData($validatorClassName)
    {
        if (false === isset($this->validatorsData[$validatorClassName])) {
            $this->validatorsData[$validatorClassName] = [];

            if (in_array(AbstractValidator::class, class_parents($validatorClassName))) {
                $validatorReflection = new \ReflectionClass($validatorClassName);
                $validatorProperties = $validatorReflection->getDefaultProperties();
                unset($validatorReflection);

                $validatorData = [
                    'supportedOptions'   => $validatorProperties['supportedOptions'],
                    'acceptsEmptyValues' => $validatorProperties['acceptsEmptyValues']
                ];

                if (in_array(FormzAbstractValidator::class, class_parents($validatorClassName))) {
                    $validatorData['formzValidator'] = true;
                    $validatorData['supportedMessages'] = $validatorProperties['supportedMessages'];
                    $validatorData['supportsAllMessages'] = $validatorProperties['supportsAllMessages'];
                }

                $this->validatorsData[$validatorClassName] = $validatorData;
            }
        }

        return $this->validatorsData[$validatorClassName];
    }
protected function getValidatorData($validatorClassName)
    {
        if (false === isset($this->validatorsData[$validatorClassName])) {
            $this->validatorsData[$validatorClassName] = [];

            if (in_array(AbstractValidator::class, class_parents($validatorClassName))) {
                $validatorReflection = new \ReflectionClass($validatorClassName);
                $validatorProperties = $validatorReflection->getDefaultProperties();
                unset($validatorReflection);

                $validatorData = [
                    'supportedOptions'   => $validatorProperties['supportedOptions'],
                    'acceptsEmptyValues' => $validatorProperties['acceptsEmptyValues']
                ];

                if (in_array(FormzAbstractValidator::class, class_parents($validatorClassName))) {
                    $validatorData['formzValidator'] = true;
                    $validatorData['supportedMessages'] = $validatorProperties['supportedMessages'];
                    $validatorData['supportsAllMessages'] = $validatorProperties['supportsAllMessages'];
                }

                $this->validatorsData[$validatorClassName] = $validatorData;
            }
        }

        return $this->validatorsData[$validatorClassName];
    }
protected function getValidatorData ( $ validatorClassName ) { if ( false === isset ( $ this -> validatorsData [ $ validatorClassName ] ) ) { $ this -> validatorsData [ $ validatorClassName ] = [ ] ; if ( in_array ( AbstractValidator :: class , class_parents ( $ validatorClassName ) ) ) { $ validatorReflection = new \ ReflectionClass ( $ validatorClassName ) ; $ validatorProperties = $ validatorReflection -> getDefaultProperties ( ) ; unset ( $ validatorReflection ) ; $ validatorData = [ 'supportedOptions' => $ validatorProperties [ 'supportedOptions' ] , 'acceptsEmptyValues' => $ validatorProperties [ 'acceptsEmptyValues' ] ] ; if ( in_array ( FormzAbstractValidator :: class , class_parents ( $ validatorClassName ) ) ) { $ validatorData [ 'formzValidator' ] = true ; $ validatorData [ 'supportedMessages' ] = $ validatorProperties [ 'supportedMessages' ] ; $ validatorData [ 'supportsAllMessages' ] = $ validatorProperties [ 'supportsAllMessages' ] ; } $ this -> validatorsData [ $ validatorClassName ] = $ validatorData ; } } return $ this -> validatorsData [ $ validatorClassName ] ; }
Will clone the data of the given validator class name. Please note that
it will use reflection to get the default value of the class properties.

@param $validatorClassName
@return array
Will clone the data of the given validator class name . Please note that it will use reflection to get the default value of the class properties .