clustering/dfs/ezpostsgresqlbackend.php
public function _getFileList(
        $scopes = false,
        $excludeScopes = false,
        $limit = false,
        $path = false
    )
    {
        $filePathList = array();
        $tables = array_unique( array( $this->metaDataTable, $this->metaDataTableCache ) );
        
        foreach ( $tables as $table )
        {
            $query = 'SELECT name FROM ' . $table;
    
            if ( is_array( $scopes ) && count( $scopes ) > 0 )
            {
                $query .= ' WHERE scope ';
                if ( $excludeScopes )
                    $query .= 'NOT ';
                $query .= "IN ('" . implode( "', '", $scopes ) . "')";
            }
    
            $stmt = $this->_query( $query, "_getFileList( array( " . implode( ', ', $scopes ) . " ), $excludeScopes )" );
            if ( !$stmt )
            {
                eZDebug::writeDebug( 'Unable to get file list', __METHOD__ );
                // @todo Throw an exception
                return false;
            }
    
            $filePathList = array();
            while ( $row = $stmt->fetch( PDO::FETCH_NUM ) )
                $filePathList[] = $row[0];
    
            unset( $stmt );
        }
        return $filePathList;
    }
public function _getFileList(
        $scopes = false,
        $excludeScopes = false,
        $limit = false,
        $path = false
    )
    {
        $filePathList = array();
        $tables = array_unique( array( $this->metaDataTable, $this->metaDataTableCache ) );
        
        foreach ( $tables as $table )
        {
            $query = 'SELECT name FROM ' . $table;
    
            if ( is_array( $scopes ) && count( $scopes ) > 0 )
            {
                $query .= ' WHERE scope ';
                if ( $excludeScopes )
                    $query .= 'NOT ';
                $query .= "IN ('" . implode( "', '", $scopes ) . "')";
            }
    
            $stmt = $this->_query( $query, "_getFileList( array( " . implode( ', ', $scopes ) . " ), $excludeScopes )" );
            if ( !$stmt )
            {
                eZDebug::writeDebug( 'Unable to get file list', __METHOD__ );
                // @todo Throw an exception
                return false;
            }
    
            $filePathList = array();
            while ( $row = $stmt->fetch( PDO::FETCH_NUM ) )
                $filePathList[] = $row[0];
    
            unset( $stmt );
        }
        return $filePathList;
    }
public function _getFileList ( $ scopes = false , $ excludeScopes = false , $ limit = false , $ path = false ) { $ filePathList = array ( ) ; $ tables = array_unique ( array ( $ this -> metaDataTable , $ this -> metaDataTableCache ) ) ; foreach ( $ tables as $ table ) { $ query = 'SELECT name FROM ' . $ table ; if ( is_array ( $ scopes ) && count ( $ scopes ) > 0 ) { $ query .= ' WHERE scope ' ; if ( $ excludeScopes ) $ query .= 'NOT ' ; $ query .= "IN ('" . implode ( "', '" , $ scopes ) . "')" ; } $ stmt = $ this -> _query ( $ query , "_getFileList( array( " . implode ( ', ' , $ scopes ) . " ), $excludeScopes )" ) ; if ( ! $ stmt ) { eZDebug :: writeDebug ( 'Unable to get file list' , __METHOD__ ) ; // @todo Throw an exception return false ; } $ filePathList = array ( ) ; while ( $ row = $ stmt -> fetch ( PDO :: FETCH_NUM ) ) $ filePathList [ ] = $ row [ 0 ] ; unset ( $ stmt ) ; } return $ filePathList ; }
Gets the list of cluster files, filtered by the optional params

@see eZDFSFileHandler::getFileList

@param array|bool $scopes filter by array of scopes to include in the list
@param bool $excludeScopes if true, $scopes param acts as an exclude filter
@param array|bool $limit limits the search to offset limit[0], limit limit[1]
@param string|bool $path filter to include entries only including $path

@return array|false the db list of entries of false if none found
Gets the list of cluster files filtered by the optional params