public function get($propertyName, $funcName, array $arguments = [], array &$errorValues = [], array &$errors)
    {
        if (false === \array_key_exists($funcName, $this->functionMap)) {
            throw new \InvalidArgumentException(
                \sprintf('Validator key \'%s\' not found', $funcName)
            );
        }

        $function = $this->functionMap[$funcName];
        $class    = \explode("::", $function);

        try {
            $result = \call_user_func_array([$class[0], $class[1]], $arguments);

            if (false === $result) {
                $funcName = $this->funcNameToUnderscore($funcName);
                if (false === \array_key_exists($funcName, $errors)) {
                    throw new \InvalidArgumentException(
                        \sprintf('Validator key \'%s\' not found in error file', $funcName)
                    );
                }

                if (\strlen($errors[$funcName]) > 0) {
                    $this->validator->setError(
                        $this->buildErrorMessage($errorValues, $errors, $funcName, $propertyName),
                        $funcName
                    );
                }
            }
        } catch (FileUploadException $e) {
            $lowerCaseFuncName = $this->funcNameToUnderscore($e->getMessage());
            $this->validator->setError(
                $this->buildErrorMessage($errorValues, $errors, $e->getMessage(), $propertyName),
                $lowerCaseFuncName
            );

            $result = false;
        }

        return $result;
    }
public function get($propertyName, $funcName, array $arguments = [], array &$errorValues = [], array &$errors)
    {
        if (false === \array_key_exists($funcName, $this->functionMap)) {
            throw new \InvalidArgumentException(
                \sprintf('Validator key \'%s\' not found', $funcName)
            );
        }

        $function = $this->functionMap[$funcName];
        $class    = \explode("::", $function);

        try {
            $result = \call_user_func_array([$class[0], $class[1]], $arguments);

            if (false === $result) {
                $funcName = $this->funcNameToUnderscore($funcName);
                if (false === \array_key_exists($funcName, $errors)) {
                    throw new \InvalidArgumentException(
                        \sprintf('Validator key \'%s\' not found in error file', $funcName)
                    );
                }

                if (\strlen($errors[$funcName]) > 0) {
                    $this->validator->setError(
                        $this->buildErrorMessage($errorValues, $errors, $funcName, $propertyName),
                        $funcName
                    );
                }
            }
        } catch (FileUploadException $e) {
            $lowerCaseFuncName = $this->funcNameToUnderscore($e->getMessage());
            $this->validator->setError(
                $this->buildErrorMessage($errorValues, $errors, $e->getMessage(), $propertyName),
                $lowerCaseFuncName
            );

            $result = false;
        }

        return $result;
    }
public function get ( $ propertyName , $ funcName , array $ arguments = [ ] , array & $ errorValues = [ ] , array & $ errors ) { if ( false === \ array_key_exists ( $ funcName , $ this -> functionMap ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Validator key \'%s\' not found' , $ funcName ) ) ; } $ function = $ this -> functionMap [ $ funcName ] ; $ class = \ explode ( "::" , $ function ) ; try { $ result = \ call_user_func_array ( [ $ class [ 0 ] , $ class [ 1 ] ] , $ arguments ) ; if ( false === $ result ) { $ funcName = $ this -> funcNameToUnderscore ( $ funcName ) ; if ( false === \ array_key_exists ( $ funcName , $ errors ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Validator key \'%s\' not found in error file' , $ funcName ) ) ; } if ( \ strlen ( $ errors [ $ funcName ] ) > 0 ) { $ this -> validator -> setError ( $ this -> buildErrorMessage ( $ errorValues , $ errors , $ funcName , $ propertyName ) , $ funcName ) ; } } } catch ( FileUploadException $ e ) { $ lowerCaseFuncName = $ this -> funcNameToUnderscore ( $ e -> getMessage ( ) ) ; $ this -> validator -> setError ( $ this -> buildErrorMessage ( $ errorValues , $ errors , $ e -> getMessage ( ) , $ propertyName ) , $ lowerCaseFuncName ) ; $ result = false ; } return $ result ; }
Gets the function from the function map and runs it against the values.

@param string $propertyName
@param string $funcName
@param array  $arguments
@param array  $errorValues
@param array  $errors

@throws \InvalidArgumentException
@return bool
Gets the function from the function map and runs it against the values .