kernel/classes/ezclusterfilehandler.php
static function instance( $filename = false )
    {
        if ( self::$isShutdownFunctionRegistered !== true )
        {
            eZExecution::addCleanupHandler( array( __CLASS__, 'cleanupGeneratingFiles' ) );
            self::$isShutdownFunctionRegistered = true;
        }

        if( $filename !== false )
        {
            $optionArray = array( 'iniFile'      => 'file.ini',
                                  'iniSection'   => 'ClusteringSettings',
                                  'iniVariable'  => 'FileHandler',
                                  'handlerParams'=> array( $filename ) );

            $options = new ezpExtensionOptions( $optionArray );

            $handler = eZExtension::getHandlerClass( $options );

            return $handler;
        }
        else
        {
            // return Filehandler from GLOBALS based on ini setting.
            if ( self::$globalHandler === null )
            {
                $optionArray = array( 'iniFile'      => 'file.ini',
                                      'iniSection'   => 'ClusteringSettings',
                                      'iniVariable'  => 'FileHandler' );

                $options = new ezpExtensionOptions( $optionArray );

                $handler = eZExtension::getHandlerClass( $options );

                self::$globalHandler = $handler;
            }
            else
                $handler = self::$globalHandler;

            return $handler;
        }
    }
static function instance( $filename = false )
    {
        if ( self::$isShutdownFunctionRegistered !== true )
        {
            eZExecution::addCleanupHandler( array( __CLASS__, 'cleanupGeneratingFiles' ) );
            self::$isShutdownFunctionRegistered = true;
        }

        if( $filename !== false )
        {
            $optionArray = array( 'iniFile'      => 'file.ini',
                                  'iniSection'   => 'ClusteringSettings',
                                  'iniVariable'  => 'FileHandler',
                                  'handlerParams'=> array( $filename ) );

            $options = new ezpExtensionOptions( $optionArray );

            $handler = eZExtension::getHandlerClass( $options );

            return $handler;
        }
        else
        {
            // return Filehandler from GLOBALS based on ini setting.
            if ( self::$globalHandler === null )
            {
                $optionArray = array( 'iniFile'      => 'file.ini',
                                      'iniSection'   => 'ClusteringSettings',
                                      'iniVariable'  => 'FileHandler' );

                $options = new ezpExtensionOptions( $optionArray );

                $handler = eZExtension::getHandlerClass( $options );

                self::$globalHandler = $handler;
            }
            else
                $handler = self::$globalHandler;

            return $handler;
        }
    }
static function instance ( $ filename = false ) { if ( self :: $ isShutdownFunctionRegistered !== true ) { eZExecution :: addCleanupHandler ( array ( __CLASS__ , 'cleanupGeneratingFiles' ) ) ; self :: $ isShutdownFunctionRegistered = true ; } if ( $ filename !== false ) { $ optionArray = array ( 'iniFile' => 'file.ini' , 'iniSection' => 'ClusteringSettings' , 'iniVariable' => 'FileHandler' , 'handlerParams' => array ( $ filename ) ) ; $ options = new ezpExtensionOptions ( $ optionArray ) ; $ handler = eZExtension :: getHandlerClass ( $ options ) ; return $ handler ; } else { // return Filehandler from GLOBALS based on ini setting. if ( self :: $ globalHandler === null ) { $ optionArray = array ( 'iniFile' => 'file.ini' , 'iniSection' => 'ClusteringSettings' , 'iniVariable' => 'FileHandler' ) ; $ options = new ezpExtensionOptions ( $ optionArray ) ; $ handler = eZExtension :: getHandlerClass ( $ options ) ; self :: $ globalHandler = $ handler ; } else $ handler = self :: $ globalHandler ; return $ handler ; } }
Returns the configured instance of an eZClusterFileHandlerInterface
See ClusteringSettings.FileHandler in file.ini

@param string|bool $filename
Optional filename the handler should be initialized with

@return eZClusterFileHandlerInterface
Returns the configured instance of an eZClusterFileHandlerInterface See ClusteringSettings . FileHandler in file . ini