Omeka_Validate_Errors

Package: Validate

class Omeka_Validate_Errors

extends ArrayObject

implements Countable implements Serializable implements ArrayAccess implements Traversable implements IteratorAggregate

This is an object wrapper for validation errors. The primary advantage to having this class is that casting it to a string will convert the errors into a nicely formatted, human-readable string.

property Omeka_Validate_Errors::$_errors

protected array

List of validation errors.

Omeka_Validate_Errors::__construct($errors = null)
Parameters:
  • $errors (array|null) – Initial errors to set.
Omeka_Validate_Errors::offsetGet($key)

Get an error from the list. Required by ArrayObject.

Parameters:
  • $key (mixed) – Key into array.
Omeka_Validate_Errors::offsetSet($key, $val)

Set an error into the list. Required by ArrayObject.

Parameters:
  • $key (mixed) – Key into array.
  • $val (mixed) – Value to store.
Omeka_Validate_Errors::get()

Get the array of errors.

Returns:array
Omeka_Validate_Errors::count()

Get the number of errors.

Returns:int
Omeka_Validate_Errors::__toString()

Get a string representation of all the stored errors.

Returns:string
Omeka_Validate_Errors::offsetExists($index)
Parameters:
  • $index
Omeka_Validate_Errors::offsetUnset($index)
Parameters:
  • $index
Omeka_Validate_Errors::append($value)
Parameters:
  • $value
Omeka_Validate_Errors::getArrayCopy()
Omeka_Validate_Errors::getFlags()
Omeka_Validate_Errors::setFlags($flags)
Parameters:
  • $flags
Omeka_Validate_Errors::asort()
Omeka_Validate_Errors::ksort()
Omeka_Validate_Errors::uasort($cmp_function)
Parameters:
  • $cmp_function
Omeka_Validate_Errors::uksort($cmp_function)
Parameters:
  • $cmp_function
Omeka_Validate_Errors::natsort()
Omeka_Validate_Errors::natcasesort()
Omeka_Validate_Errors::unserialize($serialized)
Parameters:
  • $serialized
Omeka_Validate_Errors::serialize()
Omeka_Validate_Errors::getIterator()
Omeka_Validate_Errors::exchangeArray($array)
Parameters:
  • $array
Omeka_Validate_Errors::setIteratorClass($iteratorClass)
Parameters:
  • $iteratorClass
Omeka_Validate_Errors::getIteratorClass()