|
eZ Publish
[4.2]
|
Handles proper script execution, fatal error detection and handling. More...
Static Public Member Functions | |
| static | addCleanupHandler ($handler) |
| static | addFatalErrorHandler ($handler) |
| static | cleanExit () |
| static | cleanup () |
| static | cleanupHandlers () |
| static | defaultExceptionHandler (Exception $e) |
| Installs the default Exception handler. | |
| static | fatalErrorHandlers () |
| static | isCleanExit () |
| static | registerShutdownHandler ($documentRoot=false) |
| static | setCleanExit () |
| static | uncleanShutdownHandler () |
Static Private Attributes | |
| static | $cleanupHandlers = array() |
| static | $eZDocumentRoot = null |
| static | $fatalErrorHandlers = array() |
| static | $hasCleanExit = false |
| static | $shutdownHandle = false |
Handles proper script execution, fatal error detection and handling.
By registering a fatal error handler it's possible for the PHP script to catch fatal errors, such as "Call to a member function on a non-object".
By registering a cleanup handler it's possible to make sure the script can end properly.
Definition at line 45 of file ezexecution.php.
| static eZExecution::addCleanupHandler | ( | $ | handler | ) | [static] |
Adds a cleanup handler to the end of the list, $handler must contain the name of the function to call. The function is called at the end of the script execution to do some cleanups.
Definition at line 77 of file ezexecution.php.
Referenced by eZScript\initialize(), and eZClusterFileHandler\instance().
| static eZExecution::addFatalErrorHandler | ( | $ | handler | ) | [static] |
Adds a fatal error handler to the end of the list, $handler must contain the name of the function to call. The handler will be called whenever a fatal error occurs, which usually happens when the script did not finish.
Definition at line 97 of file ezexecution.php.
Referenced by eZScript\initialize().
| static eZExecution::cleanExit | ( | ) | [static] |
Sets the clean exit flag and exits the page. Use this if you want premature exits instead of the exit function.
Definition at line 123 of file ezexecution.php.
Referenced by eZUserLoginHandler\checkUser(), eZFile\download(), eZFilePassthroughHandler\handleFileDownload(), eZUser\instance(), eZHTTPTool\sendHTTPRequest(), Cpdf\stream(), and eZSSLZone\switchIfNeeded().
| static eZExecution::cleanup | ( | ) | [static] |
Calls the cleanup handlers to make sure that the script is ready to exit.
Definition at line 59 of file ezexecution.php.
Referenced by cleanExit(), defaultExceptionHandler(), eZScript\initialize(), eZDBInterface\reportError(), eZScript\shutdown(), and uncleanShutdownHandler().
| static eZExecution::cleanupHandlers | ( | ) | [static] |
Definition at line 86 of file ezexecution.php.
Referenced by cleanup().
| static eZExecution::defaultExceptionHandler | ( | Exception $ | e | ) | [static] |
Installs the default Exception handler.
Exception the exception
Definition at line 195 of file ezexecution.php.
| static eZExecution::fatalErrorHandlers | ( | ) | [static] |
Definition at line 106 of file ezexecution.php.
Referenced by uncleanShutdownHandler().
| static eZExecution::isCleanExit | ( | ) | [static] |
Definition at line 114 of file ezexecution.php.
Referenced by uncleanShutdownHandler().
| static eZExecution::registerShutdownHandler | ( | $ | documentRoot = false | ) | [static] |
Register ::uncleanShutdownHandler as shutdown function
Definition at line 161 of file ezexecution.php.
Referenced by addCleanupHandler(), and addFatalErrorHandler().
| static eZExecution::setCleanExit | ( | ) | [static] |
Sets the clean exit flag to on, this notifies the exit handler that everything finished properly.
Definition at line 51 of file ezexecution.php.
Referenced by cleanExit(), defaultExceptionHandler(), eZScript\initialize(), eZDBInterface\reportError(), and eZScript\shutdown().
| static eZExecution::uncleanShutdownHandler | ( | ) | [static] |
Exit handler which called after the script is done, if it detects that eZ Publish did not exit cleanly it will issue an error message and display the debug.
Definition at line 135 of file ezexecution.php.
eZExecution::$cleanupHandlers = array() [static, private] |
Definition at line 231 of file ezexecution.php.
Referenced by cleanupHandlers().
eZExecution::$eZDocumentRoot = null [static, private] |
Definition at line 227 of file ezexecution.php.
eZExecution::$fatalErrorHandlers = array() [static, private] |
Definition at line 230 of file ezexecution.php.
Referenced by fatalErrorHandlers().
eZExecution::$hasCleanExit = false [static, private] |
Definition at line 228 of file ezexecution.php.
Referenced by isCleanExit().
eZExecution::$shutdownHandle = false [static, private] |
Definition at line 229 of file ezexecution.php.