static public function registerShutdownPerfLogger( $onlyIfConfigured = false, $eZ5Context = false )
    {
        if ( $onlyIfConfigured && eZPerfLoggerINI::variable( 'GeneralSettings', 'AlwaysRegisterShutdownPerfLogger' ) !== 'enabled' )
        {
            return false;
        }

        foreach( eZExecution::cleanupHandlers() as $handler )
        {
            if ( $handler == array( __CLASS__, 'cleanup' ) || $handler == array( __CLASS__, 'cleanupOnCleanExit' ) )
            {
                return true;
            }
        }

        if ( $eZ5Context )
        {
            eZExecution::addCleanupHandler( array( __CLASS__, 'cleanupOnCleanExit' ) );
        }
        else
        {
            eZExecution::addCleanupHandler( array( __CLASS__, 'cleanup' ) );
        }

        return true;
    }
static public function registerShutdownPerfLogger( $onlyIfConfigured = false, $eZ5Context = false )
    {
        if ( $onlyIfConfigured && eZPerfLoggerINI::variable( 'GeneralSettings', 'AlwaysRegisterShutdownPerfLogger' ) !== 'enabled' )
        {
            return false;
        }

        foreach( eZExecution::cleanupHandlers() as $handler )
        {
            if ( $handler == array( __CLASS__, 'cleanup' ) || $handler == array( __CLASS__, 'cleanupOnCleanExit' ) )
            {
                return true;
            }
        }

        if ( $eZ5Context )
        {
            eZExecution::addCleanupHandler( array( __CLASS__, 'cleanupOnCleanExit' ) );
        }
        else
        {
            eZExecution::addCleanupHandler( array( __CLASS__, 'cleanup' ) );
        }

        return true;
    }
static public function registerShutdownPerfLogger ( $ onlyIfConfigured = false , $ eZ5Context = false ) { if ( $ onlyIfConfigured && eZPerfLoggerINI :: variable ( 'GeneralSettings' , 'AlwaysRegisterShutdownPerfLogger' ) !== 'enabled' ) { return false ; } foreach ( eZExecution :: cleanupHandlers ( ) as $ handler ) { if ( $ handler == array ( __CLASS__ , 'cleanup' ) || $ handler == array ( __CLASS__ , 'cleanupOnCleanExit' ) ) { return true ; } } if ( $ eZ5Context ) { eZExecution :: addCleanupHandler ( array ( __CLASS__ , 'cleanupOnCleanExit' ) ) ; } else { eZExecution :: addCleanupHandler ( array ( __CLASS__ , 'cleanup' ) ) ; } return true ; }
Registers the 'cleanup' function as shutdown handler, trying to do it only once

@param bool $onlyIfConfigured when true, the registration only happens subject to an ini setting
@return bool false if registration is aborted, true if the handler is (or was already) registered
Registers the cleanup function as shutdown handler trying to do it only once