-
addError ($error, $name)
Browse code
| $error |
An sfValidatorError instance |
| $name |
The error name |
Adds an error.
This method merges sfValidatorErrorSchema errors with the current instance.
-
| $errors |
An array of sfValidatorError instances |
Adds an array of errors.
-
Returns the number of errors (implements the Countable interface).
returns The number of array
-
Returns the current error (implements the Iterator interface).
returns The escaped value
-
@see sfValidatorError
-
Gets an array of all errors
returns An array of sfValidatorError instances
-
(array) getGlobalErrors ()
Browse code
Gets an array of all global errors
returns An array of sfValidatorError instances
-
@see sfValidatorError
-
(array) getNamedErrors ()
Browse code
Gets an array of all named errors
returns An array of sfValidatorError instances
-
@see sfValidatorError
-
Get the key associated with the current error (implements the Iterator interface).
returns The key
-
Moves to the next error (implements the Iterator interface).
-
(bool) offsetExists ($name)
Browse code
| $name |
The name of the error |
Returns true if the error exists (implements the ArrayAccess interface).
returns true if the error exists, false otherwise
-
(sfValidatorError) offsetGet ($name)
Browse code
| $name |
The offset of the value to get |
Returns the error associated with the name (implements the ArrayAccess interface).
returns A sfValidatorError instance
-
offsetSet ($offset, $value)
Browse code
| $offset |
(ignored) |
| $value |
(ignored) |
Throws an exception saying that values cannot be set (implements the ArrayAccess interface).
throws LogicException
-
Impossible to call because this is an exception!
-
Reset the error array to the beginning (implements the Iterator interface).
-
Serializes the current instance.
returns The instance as a serialized string
-
unserialize ($serialized)
Browse code
| $serialized |
A serialized sfValidatorError instance |
Unserializes a sfValidatorError instance.
-
Updates the exception error code according to the current errors.
-
Updates the exception error message according to the current errors.
-
Returns true if the current error is valid (implements the Iterator interface).
returns The validity of the current element; true if it is valid
-
__construct ($validator, $errors)
Browse code
| $validator |
An sfValidatorBase instance |
| $errors |
An array of errors |
Constructor.