miErrorsCollectionKeep errors which arise during script life
Located in /util/ErrorsCollection.inc (line 35)
addError (line 64)
Adds error.
You need to specify error level and error description. The $code parameter is not compulsory.
Example:
1 <?php
2 $UserErrors = new miErrorsCollection;
3 $UserErrors->addError(ERRORLEVEL_CRITICAL, 'User error description');
4 ?>
getErrors (line 91)
Returns an array with all errors
Example:
1 <?php
2 $UserErrors = new miErrorsCollection;
3 ...
4 $errors = $UserErrors->getErrors();
5 ?>
getLastError (line 110)
Returns last error. If there aren't any errors returns false
Example:
1 <?php
2 $UserErrors = new miErrorsCollection;
3 ...
4 $error = $UserErrors->getLastError();
5 ?>
getNumErrors (line 133)
Returns the number of errors
Example:
1 <?php
2 $UserErrors = new miErrorsCollection;
3 ...
4 $count = $UserErrors->getNumErrors();
5 ?>
hasErrors (line 155)
Returns true if there are any errors in this object
Example:
1 <?php
2 $UserErrors = new miErrorsCollection;
3 ...
4 if ($UserErrors->hasErrors()) {
5 //tracking error
6 {
7 ?>
Documentation generated on Mon, 18 Oct 2004 14:58:31 +0300 by phpDocumentor 1.2.3