|
eZ Publish
[trunk]
|
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 22 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 54 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 74 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 100 of file ezexecution.php.
Referenced by eZUserLoginHandler\checkUser(), contentPDFPassthrough(), datatypeDownload(), eZFile\download(), eZFilePassthroughHandler\handleFileDownload(), eZUser\instance(), ezpMobileDeviceRegexpFilter\redirect(), response(), eZHTTPTool\sendHTTPRequest(), Cpdf\stream(), eZSSLZone\switchIfNeeded(), and templateOperatorDownload().
| static eZExecution::cleanup | ( | ) | [static] |
Calls the cleanup handlers to make sure that the script is ready to exit.
Definition at line 36 of file ezexecution.php.
Referenced by cleanExit(), defaultExceptionHandler(), exitWithInternalError(), eZScript\initialize(), eZDBInterface\reportError(), eZScript\shutdown(), and uncleanShutdownHandler().
| static eZExecution::cleanupHandlers | ( | ) | [static] |
Definition at line 63 of file ezexecution.php.
Referenced by cleanup().
| static eZExecution::defaultExceptionHandler | ( | Exception $ | e | ) | [static] |
Installs the default Exception handler.
Exception the exception
Definition at line 172 of file ezexecution.php.
| static eZExecution::fatalErrorHandlers | ( | ) | [static] |
Definition at line 83 of file ezexecution.php.
Referenced by uncleanShutdownHandler().
| static eZExecution::isCleanExit | ( | ) | [static] |
Definition at line 91 of file ezexecution.php.
Referenced by uncleanShutdownHandler().
| static eZExecution::registerShutdownHandler | ( | $ | documentRoot = false | ) | [static] |
Register ::uncleanShutdownHandler as shutdown function
Definition at line 138 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 28 of file ezexecution.php.
Referenced by cleanExit(), defaultExceptionHandler(), exitWithInternalError(), 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 112 of file ezexecution.php.
eZExecution::$cleanupHandlers = array() [static, private] |
Definition at line 208 of file ezexecution.php.
Referenced by cleanupHandlers().
eZExecution::$eZDocumentRoot = null [static, private] |
Definition at line 204 of file ezexecution.php.
eZExecution::$fatalErrorHandlers = array() [static, private] |
Definition at line 207 of file ezexecution.php.
Referenced by fatalErrorHandlers().
eZExecution::$hasCleanExit = false [static, private] |
Definition at line 205 of file ezexecution.php.
Referenced by isCleanExit().
eZExecution::$shutdownHandle = false [static, private] |
Definition at line 206 of file ezexecution.php.