Doctrine 1.2.4
Doctrine_Validator_Exception Class Reference

Inherits Doctrine_Exception, Countable, and IteratorAggregate.

Public Member Functions

 __construct (array $invalid)
 
 errorMessage ($value=null)
 
 inspect ($function)
 

Detailed Description

Definition at line 33 of file Exception.php.

Constructor & Destructor Documentation

Doctrine_Validator_Exception::__construct ( array  $invalid)
Parameters
Doctrine_Validator$validator

Definition at line 43 of file Exception.php.

{
$this->invalid = $invalid;
parent::__construct($this->generateMessage());
}

Member Function Documentation

Doctrine_Exception::errorMessage (   $value = null)
inherited

Return a textual error message for a Doctrine error code

Parameters
int|arrayinteger error code, null to get the current error code-message map, or an array with a new error code-message map
Returns
string error message

Definition at line 82 of file Exception.php.

{
if (is_null($value)) {
return self::$_errorMessages;
}
return isset(self::$_errorMessages[$value]) ?
self::$_errorMessages[$value] : self::$_errorMessages[Doctrine_Core::ERR];
}
Doctrine_Validator_Exception::inspect (   $function)

This method will apply the value of the $function variable as a user_func to tall errorstack objects in the exception

Parameters
mixedEither string with function name or array with object, functionname. See call_user_func in php manual for more inforamtion

Definition at line 83 of file Exception.php.

{
foreach ($this->invalid as $record) {
call_user_func($function, $record->getErrorStack());
}
}

The documentation for this class was generated from the following file: