Public Member Functions | |
| resetError () | |
| setError ($msg, $no=0) | |
| error ($html=false, $with_nb=true) | |
| setDbError ($db_error_msg) | |
| bulkSetError ($errors) | |
Private Attributes | |
| $error = array() | |
Basis idea from Olivier Meunier
| Pluf_Error::resetError | ( | ) |
Reset the errors
| Pluf_Error::setError | ( | $ | msg, | |
| $ | no = 0 | |||
| ) |
Set an error.
By convention the number is 4xx if the error is coming from the user or 5xx if coming from the system (database error for ex.)
| string | Error message | |
| int | Error number (0) |
| Pluf_Error::error | ( | $ | html = false, |
|
| $ | with_nb = true | |||
| ) |
Returns the errors.
| bool | Errors as HTML list (false) | |
| bool | Show numbers (true) |
| Pluf_Error::setDbError | ( | $ | db_error_msg | ) |
Helper function to set the error from the DB.
| string | Error message from the DB |
| Pluf_Error::bulkSetError | ( | $ | errors | ) |
Bulk set errors.
Used when you went to recopy the errors of one object into another. You can call that way: $object->bulkSetErrors($otherobject->error());
| array | List of errors |
Pluf_Error::$error = array() [private] |
Current errors.