Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

JBaseObject.class.php

Go to the documentation of this file.
00001 <?php
00006 include_once("core/system/JErrorHandler.class.php");
00007 
00012 class JBaseObject
00013 {
00014         var $baseErrorConstructor=false;        
00015 
00016                                                                         
00017         
00023         function RaiseConstructorError($error, $str="")
00024         {
00025                 // Sets the flag for an error in the constructor
00026                 $this->baseErrorConstructor = true;                     
00027                 
00028                 // Raises the error
00029                 $this->RaiseError($error, $str);
00030         }
00031         
00038         function RaiseError($error, $str="")
00039         {
00040                 $errorhandler =& JErrorHandler::GetInstance();
00041                 
00042                 if (! JErrorHandler::IsError($error))
00043                         $error = new JError($error, $str);
00044                                         
00045                 return $errorhandler->PushError($error);
00046         }
00047         
00052         function GetLastError()
00053         {
00054                 $errorhandler =& JErrorHandler::GetInstance();
00055                 if ($errorhandler->HasErrors())
00056                         return $errorhandler->PopError();
00057                 else
00058                         return null;
00059         }
00060         
00065         function GetBaseErrorConstructor()
00066         {
00067                 return $this->baseErrorConstructor;
00068         }
00069 }
00070 ?>

Generated on Wed Nov 19 20:29:34 2003 for James by doxygen 1.3.4