protected function resolveValidatorObjectName($validatorName)
    {
        if (strpos($validatorName, ':') !== false || strpbrk($validatorName, '_\\') === false) {
            // Found shorthand validator, either extbase or foreign extension
            // NotEmpty or Acme.MyPck.Ext:MyValidator
            list($extensionName, $extensionValidatorName) = explode(':', $validatorName);

            if ($validatorName !== $extensionName && $extensionValidatorName !== '') {
                // Shorthand custom
                if (strpos($extensionName, '.') !== false) {
                    $extensionNameParts = explode('.', $extensionName);
                    $extensionName = array_pop($extensionNameParts);
                    $vendorName = implode('\\', $extensionNameParts);
                    $possibleClassName = $vendorName . '\\' . $extensionName . '\\Validation\\Validator\\' . $extensionValidatorName;
                } else {
                    $possibleClassName = 'Tx_' . $extensionName . '_Validation_Validator_' . $extensionValidatorName;
                }
            } else {
                // Shorthand built in
                $possibleClassName = 'TYPO3\\CMS\\Extbase\\Validation\\Validator\\' . $this->getValidatorType($validatorName);
            }
        } else {
            // Full qualified
            // Tx_MyExt_Validation_Validator_MyValidator or \Acme\Ext\Validation\Validator\FooValidator
            $possibleClassName = $validatorName;
            if (!empty($possibleClassName) && $possibleClassName[0] === '\\') {
                $possibleClassName = substr($possibleClassName, 1);
            }
        }

        if (substr($possibleClassName, - strlen('Validator')) !== 'Validator') {
            $possibleClassName .= 'Validator';
        }

        if (class_exists($possibleClassName)) {
            $possibleClassNameInterfaces = class_implements($possibleClassName);
            if (!in_array(\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface::class, $possibleClassNameInterfaces)) {
                // The guessed validatorname is a valid class name, but does not implement the ValidatorInterface
                throw new NoSuchValidatorException('Validator class ' . $validatorName . ' must implement \TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface', 1365776838);
            }
            $resolvedValidatorName = $possibleClassName;
        } else {
            throw new NoSuchValidatorException('Validator class ' . $validatorName . ' does not exist', 1365799920);
        }

        return $resolvedValidatorName;
    }
protected function resolveValidatorObjectName($validatorName)
    {
        if (strpos($validatorName, ':') !== false || strpbrk($validatorName, '_\\') === false) {
            // Found shorthand validator, either extbase or foreign extension
            // NotEmpty or Acme.MyPck.Ext:MyValidator
            list($extensionName, $extensionValidatorName) = explode(':', $validatorName);

            if ($validatorName !== $extensionName && $extensionValidatorName !== '') {
                // Shorthand custom
                if (strpos($extensionName, '.') !== false) {
                    $extensionNameParts = explode('.', $extensionName);
                    $extensionName = array_pop($extensionNameParts);
                    $vendorName = implode('\\', $extensionNameParts);
                    $possibleClassName = $vendorName . '\\' . $extensionName . '\\Validation\\Validator\\' . $extensionValidatorName;
                } else {
                    $possibleClassName = 'Tx_' . $extensionName . '_Validation_Validator_' . $extensionValidatorName;
                }
            } else {
                // Shorthand built in
                $possibleClassName = 'TYPO3\\CMS\\Extbase\\Validation\\Validator\\' . $this->getValidatorType($validatorName);
            }
        } else {
            // Full qualified
            // Tx_MyExt_Validation_Validator_MyValidator or \Acme\Ext\Validation\Validator\FooValidator
            $possibleClassName = $validatorName;
            if (!empty($possibleClassName) && $possibleClassName[0] === '\\') {
                $possibleClassName = substr($possibleClassName, 1);
            }
        }

        if (substr($possibleClassName, - strlen('Validator')) !== 'Validator') {
            $possibleClassName .= 'Validator';
        }

        if (class_exists($possibleClassName)) {
            $possibleClassNameInterfaces = class_implements($possibleClassName);
            if (!in_array(\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface::class, $possibleClassNameInterfaces)) {
                // The guessed validatorname is a valid class name, but does not implement the ValidatorInterface
                throw new NoSuchValidatorException('Validator class ' . $validatorName . ' must implement \TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface', 1365776838);
            }
            $resolvedValidatorName = $possibleClassName;
        } else {
            throw new NoSuchValidatorException('Validator class ' . $validatorName . ' does not exist', 1365799920);
        }

        return $resolvedValidatorName;
    }
protected function resolveValidatorObjectName ( $ validatorName ) { if ( strpos ( $ validatorName , ':' ) !== false || strpbrk ( $ validatorName , '_\\' ) === false ) { // Found shorthand validator, either extbase or foreign extension // NotEmpty or Acme.MyPck.Ext:MyValidator list ( $ extensionName , $ extensionValidatorName ) = explode ( ':' , $ validatorName ) ; if ( $ validatorName !== $ extensionName && $ extensionValidatorName !== '' ) { // Shorthand custom if ( strpos ( $ extensionName , '.' ) !== false ) { $ extensionNameParts = explode ( '.' , $ extensionName ) ; $ extensionName = array_pop ( $ extensionNameParts ) ; $ vendorName = implode ( '\\' , $ extensionNameParts ) ; $ possibleClassName = $ vendorName . '\\' . $ extensionName . '\\Validation\\Validator\\' . $ extensionValidatorName ; } else { $ possibleClassName = 'Tx_' . $ extensionName . '_Validation_Validator_' . $ extensionValidatorName ; } } else { // Shorthand built in $ possibleClassName = 'TYPO3\\CMS\\Extbase\\Validation\\Validator\\' . $ this -> getValidatorType ( $ validatorName ) ; } } else { // Full qualified // Tx_MyExt_Validation_Validator_MyValidator or \Acme\Ext\Validation\Validator\FooValidator $ possibleClassName = $ validatorName ; if ( ! empty ( $ possibleClassName ) && $ possibleClassName [ 0 ] === '\\' ) { $ possibleClassName = substr ( $ possibleClassName , 1 ) ; } } if ( substr ( $ possibleClassName , - strlen ( 'Validator' ) ) !== 'Validator' ) { $ possibleClassName .= 'Validator' ; } if ( class_exists ( $ possibleClassName ) ) { $ possibleClassNameInterfaces = class_implements ( $ possibleClassName ) ; if ( ! in_array ( \ TYPO3 \ CMS \ Extbase \ Validation \ Validator \ ValidatorInterface :: class , $ possibleClassNameInterfaces ) ) { // The guessed validatorname is a valid class name, but does not implement the ValidatorInterface throw new NoSuchValidatorException ( 'Validator class ' . $ validatorName . ' must implement \TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface' , 1365776838 ) ; } $ resolvedValidatorName = $ possibleClassName ; } else { throw new NoSuchValidatorException ( 'Validator class ' . $ validatorName . ' does not exist' , 1365799920 ) ; } return $ resolvedValidatorName ; }
Returns an object of an appropriate validator for the given class. If no validator is available
FALSE is returned

@param string $validatorName Either the fully qualified class name of the validator or the short name of a built-in validator

@throws Exception\NoSuchValidatorException
@return string Name of the validator object
Returns an object of an appropriate validator for the given class . If no validator is available FALSE is returned