kernel/private/classes/clusterfilehandlers/ezdfsfilehandler.php
public function loadMetaData( $force = false )
    {
        // Fetch metadata.
        if ( $this->filePath === false )
            return;

        if ( $force && isset( $GLOBALS['eZClusterInfo'][$this->filePath] ) )
            unset( $GLOBALS['eZClusterInfo'][$this->filePath] );

        // Checks for metadata stored in memory, useful for repeated access
        // to the same file in one request
        // TODO: On PHP5 turn into static member
        if ( isset( $GLOBALS['eZClusterInfo'][$this->filePath] ) )
        {
            $GLOBALS['eZClusterInfo'][$this->filePath]['cnt'] += 1;
            $this->_metaData = $GLOBALS['eZClusterInfo'][$this->filePath]['data'];
            return;
        }

        $metaData = self::$dbbackend->_fetchMetadata( $this->filePath );
        if ( $metaData )
            $this->_metaData = $metaData;
        else
            $this->_metaData = false;

        // Clean up old entries if the maximum count is reached
        if ( isset( $GLOBALS['eZClusterInfo'] ) &&
             count( $GLOBALS['eZClusterInfo'] ) >= self::INFOCACHE_MAX )
        {
            usort( $GLOBALS['eZClusterInfo'], function ( $a, $b ) {
                $a = $a['cnt'];
                $b = $b['cnt'];
                
                if ( $a == $b )
                {
                    return 0;
                }

                return $a > $b ? -1 : 1;
            });
            array_pop( $GLOBALS['eZClusterInfo'] );
        }
        $GLOBALS['eZClusterInfo'][$this->filePath] = array( 'cnt' => 1,
                                                            'data' => $metaData );
    }
public function loadMetaData( $force = false )
    {
        // Fetch metadata.
        if ( $this->filePath === false )
            return;

        if ( $force && isset( $GLOBALS['eZClusterInfo'][$this->filePath] ) )
            unset( $GLOBALS['eZClusterInfo'][$this->filePath] );

        // Checks for metadata stored in memory, useful for repeated access
        // to the same file in one request
        // TODO: On PHP5 turn into static member
        if ( isset( $GLOBALS['eZClusterInfo'][$this->filePath] ) )
        {
            $GLOBALS['eZClusterInfo'][$this->filePath]['cnt'] += 1;
            $this->_metaData = $GLOBALS['eZClusterInfo'][$this->filePath]['data'];
            return;
        }

        $metaData = self::$dbbackend->_fetchMetadata( $this->filePath );
        if ( $metaData )
            $this->_metaData = $metaData;
        else
            $this->_metaData = false;

        // Clean up old entries if the maximum count is reached
        if ( isset( $GLOBALS['eZClusterInfo'] ) &&
             count( $GLOBALS['eZClusterInfo'] ) >= self::INFOCACHE_MAX )
        {
            usort( $GLOBALS['eZClusterInfo'], function ( $a, $b ) {
                $a = $a['cnt'];
                $b = $b['cnt'];
                
                if ( $a == $b )
                {
                    return 0;
                }

                return $a > $b ? -1 : 1;
            });
            array_pop( $GLOBALS['eZClusterInfo'] );
        }
        $GLOBALS['eZClusterInfo'][$this->filePath] = array( 'cnt' => 1,
                                                            'data' => $metaData );
    }
public function loadMetaData ( $ force = false ) { // Fetch metadata. if ( $ this -> filePath === false ) return ; if ( $ force && isset ( $ GLOBALS [ 'eZClusterInfo' ] [ $ this -> filePath ] ) ) unset ( $ GLOBALS [ 'eZClusterInfo' ] [ $ this -> filePath ] ) ; // Checks for metadata stored in memory, useful for repeated access // to the same file in one request // TODO: On PHP5 turn into static member if ( isset ( $ GLOBALS [ 'eZClusterInfo' ] [ $ this -> filePath ] ) ) { $ GLOBALS [ 'eZClusterInfo' ] [ $ this -> filePath ] [ 'cnt' ] += 1 ; $ this -> _metaData = $ GLOBALS [ 'eZClusterInfo' ] [ $ this -> filePath ] [ 'data' ] ; return ; } $ metaData = self :: $ dbbackend -> _fetchMetadata ( $ this -> filePath ) ; if ( $ metaData ) $ this -> _metaData = $ metaData ; else $ this -> _metaData = false ; // Clean up old entries if the maximum count is reached if ( isset ( $ GLOBALS [ 'eZClusterInfo' ] ) && count ( $ GLOBALS [ 'eZClusterInfo' ] ) >= self :: INFOCACHE_MAX ) { usort ( $ GLOBALS [ 'eZClusterInfo' ] , function ( $ a , $ b ) { $ a = $ a [ 'cnt' ] ; $ b = $ b [ 'cnt' ] ; if ( $ a == $ b ) { return 0 ; } return $ a > $ b ? - 1 : 1 ; } ) ; array_pop ( $ GLOBALS [ 'eZClusterInfo' ] ) ; } $ GLOBALS [ 'eZClusterInfo' ] [ $ this -> filePath ] = array ( 'cnt' => 1 , 'data' => $ metaData ) ; }
Loads file meta information.

@param bool $force File stats will be refreshed if true
@return void
Loads file meta information .