sfValidatorBase allows you to apply constraints to user entered parameters.
Inheritence
sfDoctrineUniqueValidator, sfPropelUniqueValidator, sfCallbackValidator, sfCompareValidator, sfDateValidator, sfEmailValidator, sfFileValidator, sfNumberValidator, sfRegexValidator, sfStringValidator, sfUrlValidator <
sfValidator
Method Summary
-
bool
execute(&$value, &$error)
Executes this validator.
-
getContext()
Retrieves the current application context.
-
mixed
getParameter($name, $default = null)
Retrieves a parameter from the validator.
-
getParameterHolder()
Retrieves the parameters from the validator.
-
boolean
hasParameter($name)
Indicates whether or not a parameter exist for the validator.
-
bool
initialize((sfContext) $context, $parameters = array())
Initializes this validator.
-
setParameter($name, $value)
Sets a parameter for the validator.
-
__construct($context, $parameters = array())
Class constructor.
Method Details
-
(bool) execute (&$value, &$error)
Browse code
| &$value |
A file or parameter value/array
|
| &$error |
An error message reference
|
Executes this validator.
returns true, if this validator executes successfully, otherwise false
-
Retrieves the current application context.
returns The current sfContext instance
-
(mixed) getParameter ($name, $default = null)
Browse code
| $name |
Parameter name
|
| $default |
A default parameter value
|
Retrieves a parameter from the validator.
returns A parameter value
-
Retrieves the parameters from the validator.
returns List of parameters
-
(boolean) hasParameter ($name)
Browse code
Indicates whether or not a parameter exist for the validator.
returns true, if parameter exists, otherwise false
-
(bool) initialize ((sfContext) $context, $parameters = array())
Browse code
| $context |
The current application context
|
| $parameters |
An associative array of initialization parameters
|
Initializes this validator.
returns true, if initialization completes successfully, otherwise false
-
setParameter ($name, $value)
Browse code
| $name |
A parameter name
|
| $value |
A parameter value
|
Sets a parameter for the validator.
-
__construct ($context, $parameters = array())
Browse code
Class constructor.
|