PHP Класс eZExecution

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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
addCleanupHandler ( $handler ) *! Adds a cleanup handler to the end of the list, \a $handler must contain the name of the function to call.
addFatalErrorHandler ( $handler ) *! Adds a fatal error handler to the end of the list, \a $handler must contain the name of the function to call.
cleanExit ( ) *! Sets the clean exit flag and exits the page.
cleanup ( ) *! Calls the cleanup handlers to make sure that the script is ready to exit.
cleanupHandlers ( ) *! \return An array with cleanup handlers.
defaultExceptionHandler ( $e ) : void Installs the default Exception handler
fatalErrorHandlers ( ) *! \return An array with fatal error handlers.
isCleanExit ( ) *! \return true if the request finished properly.
registerShutdownHandler ( $documentRoot = false ) *! Register ::uncleanShutdownHandler as shutdown function
setCleanExit ( $hasCleanExit = true ) *! Sets the clean exit flag to on, this notifies the exit handler that everything finished properly.
uncleanShutdownHandler ( ) *! 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.

Описание методов

addCleanupHandler() статический публичный Метод

The function is called at the end of the script execution to do some cleanups.
static public addCleanupHandler ( $handler )

addFatalErrorHandler() статический публичный Метод

The handler will be called whenever a fatal error occurs, which usually happens when the script did not finish.
static public addFatalErrorHandler ( $handler )

cleanExit() статический публичный Метод

Use this if you want premature exits instead of the \c exit function.
static public cleanExit ( )

cleanup() статический публичный Метод

*! Calls the cleanup handlers to make sure that the script is ready to exit.
static public cleanup ( )

cleanupHandlers() статический публичный Метод

*! \return An array with cleanup handlers.
static public cleanupHandlers ( )

defaultExceptionHandler() публичный статический Метод

Installs the default Exception handler
public static defaultExceptionHandler ( $e ) : void
Результат void

fatalErrorHandlers() статический публичный Метод

*! \return An array with fatal error handlers.
static public fatalErrorHandlers ( )

isCleanExit() статический публичный Метод

*! \return true if the request finished properly.
static public isCleanExit ( )

registerShutdownHandler() публичный статический Метод

*! Register ::uncleanShutdownHandler as shutdown function
public static registerShutdownHandler ( $documentRoot = false )

setCleanExit() статический публичный Метод

*! Sets the clean exit flag to on, this notifies the exit handler that everything finished properly.
static public setCleanExit ( $hasCleanExit = true )

uncleanShutdownHandler() статический публичный Метод

*! 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.
static public uncleanShutdownHandler ( )