sfValidatorFromDescription converts a string to a validator.
Method Summary
-
string
asPhp()
Returns a PHP representation for the validator.
-
array
convertInfixToRpn($tokens)
Converts a token array from an infix notation to a RPN.
-
getValidator()
@see sfValidatorDecorator
-
array
parseArguments($string, $i)
Parses validator arguments.
-
mixed
reduceTokens($tokens, $method)
Reduces tokens to a single token and convert it with the given method.
-
array
tokenize($string)
Tokenizes a validator string to a list of tokens in RPN.
-
__construct()
@see sfValidatorBase
asString , clean , doClean , getDefaultMessages , getDefaultOptions , getMessage , getMessages , getOption , getOptions , getValidator , hasOption , setMessage , setMessages , setOption , setOptions , __construct
addMessage , addOption , addRequiredOption , asString , clean , configure , doClean , getCharset , getDefaultMessages , getDefaultOptions , getEmptyValue , getErrorCodes , getMessage , getMessages , getMessagesWithoutDefaults , getOption , getOptions , getOptionsWithoutDefaults , getRequiredOptions , hasOption , isEmpty , setCharset , setDefaultMessage , setDefaultMessages , setDefaultOptions , setMessage , setMessages , setOption , setOptions , __construct
Method Details
-
Returns a PHP representation for the validator.
This PHP representation can be evaled to return the object validator. This is mainly useful to cache the result of the validator string parsing.
returns The PHP representation for the validator
-
(array) convertInfixToRpn ($tokens)
Browse code
| $tokens |
An array of tokens in infix notation |
Converts a token array from an infix notation to a RPN.
returns An array of token in RPN
-
@see sfValidatorDecorator
-
(array) parseArguments ($string, $i)
Browse code
| $string |
The string to parse |
| $i |
The indice to start the parsing |
Parses validator arguments.
returns An array of parameters
-
(mixed) reduceTokens ($tokens, $method)
Browse code
| $tokens |
An array of tokens |
| $method |
The method name to execute on each token |
Reduces tokens to a single token and convert it with the given method.
returns A single validator representation
-
(array) tokenize ($string)
Browse code
| $string |
A validator string |
Tokenizes a validator string to a list of tokens in RPN.
returns An array of tokens
-
@see sfValidatorBase
|