sfDateValidator verifies a parameter is of a date format.
Method Summary
-
bool
execute(&$value, (error) &$error)
Execute this validator.
-
getValidDate(($value) $value, ($culture) $culture)
Converts the given date into a Unix timestamp.
-
bool
initialize((sfContext) $context, $parameters = null)
Initializes the validator.
Methods inherited from sfValidator
execute , getContext , getParameter , getParameterHolder , hasParameter , initialize , setParameter , __construct
Method Details
-
(bool) execute (&$value, (error) &$error)
Browse code
| &$value |
A file or parameter value/array
|
| &$error |
An error message reference
|
Execute this validator.
returns true, if this validator executes successfully, otherwise false
-
getValidDate (($value) $value, ($culture) $culture)
Browse code
| $value |
Date to convert
|
| $culture |
Language culture to use
|
Converts the given date into a Unix timestamp.
Returns null if the date is invalid
-
(bool) initialize ((sfContext) $context, $parameters = null)
Browse code
| $context |
The current application context
|
| $parameters |
An associative array of initialization parameters
|
Initializes the validator.
returns true, if initialization completes successfully, otherwise false
|