symfony API

sfValidatorErrorSchema Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.4 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:

sfValidatorErrorSchema represents a validation schema error.

Inheritence

sfValidatorErrorSchema  <  sfValidatorError

Method Summary

  • sfValidatorErrorSchema addError($error, $name)
    Adds an error.
  • sfValidatorErrorSchema addErrors($errors)
    Adds an array of errors.
  • int count()
    Returns the number of errors (implements the Countable interface).
  • mixed current()
    Returns the current error (implements the Iterator interface).
  • getArguments()
    @see sfValidatorError
  • array getErrors()
    Gets an array of all errors
  • array getGlobalErrors()
    Gets an array of all global errors
  • getMessageFormat()
    @see sfValidatorError
  • array getNamedErrors()
    Gets an array of all named errors
  • getValue()
    @see sfValidatorError
  • string key()
    Get the key associated with the current error (implements the Iterator interface).
  • next()
    Moves to the next error (implements the Iterator interface).
  • bool offsetExists($name)
    Returns true if the error exists (implements the ArrayAccess interface).
  • sfValidatorError offsetGet($name)
    Returns the error associated with the name (implements the ArrayAccess interface).
  • offsetSet($offset, $value)
    Throws an exception saying that values cannot be set (implements the ArrayAccess interface).
  • offsetUnset($offset)
    Impossible to call because this is an exception!
  • rewind()
    Reset the error array to the beginning (implements the Iterator interface).
  • string serialize()
    Serializes the current instance.
  • unserialize($serialized)
    Unserializes a sfValidatorError instance.
  • updateCode()
    Updates the exception error code according to the current errors.
  • updateMessage()
    Updates the exception error message according to the current errors.
  • boolean valid()
    Returns true if the current error is valid (implements the Iterator interface).
  • __construct($validator, $errors)
    Constructor.

Methods inherited from sfValidatorError

getArguments , getMessageFormat , getValidator , getValue , serialize , unserialize , __construct , __toString

Method Details

  • (sfValidatorErrorSchema) 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.

    returns The current error schema instance

  • (sfValidatorErrorSchema) addErrors ($errors) Browse code

    $errors An array of sfValidatorError instances

    Adds an array of errors.

    returns The current error schema instance

  • (int) count () Browse code

    Returns the number of errors (implements the Countable interface).

    returns The number of array

  • (mixed) current () Browse code

    Returns the current error (implements the Iterator interface).

    returns The escaped value

  • getArguments () Browse code

    @see sfValidatorError

  • (array) getErrors () Browse code

    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

  • getMessageFormat () Browse code

    @see sfValidatorError

  • (array) getNamedErrors () Browse code

    Gets an array of all named errors

    returns An array of sfValidatorError instances

  • getValue () Browse code

    @see sfValidatorError

  • (string) key () Browse code

    Get the key associated with the current error (implements the Iterator interface).

    returns The key

  • next () Browse code

    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

  • offsetUnset ($offset) Browse code

    $offset (ignored)

    Impossible to call because this is an exception!

  • rewind () Browse code

    Reset the error array to the beginning (implements the Iterator interface).

  • (string) serialize () Browse code

    Serializes the current instance.

    returns The instance as a serialized string

  • unserialize ($serialized) Browse code

    $serialized A serialized sfValidatorError instance

    Unserializes a sfValidatorError instance.

  • updateCode () Browse code

    Updates the exception error code according to the current errors.

  • updateMessage () Browse code

    Updates the exception error message according to the current errors.

  • (boolean) valid () Browse code

    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.