public function getFileContentFromIndex($hash = "")
    {
        $fileContent = false;

        $queryBuilder = Db::getQueryBuilder('tx_kesearch_index');
        $queryBuilder->getRestrictions()->removeAll();
        $hashRow = $queryBuilder
            ->select('*')
            ->from('tx_kesearch_index')
            ->where(
                $queryBuilder->expr()->eq(
                    'hash',
                    $queryBuilder->quote($hash, \PDO::PARAM_STR)
                )
            )
            ->setMaxResults(1)
            ->execute()
            ->fetch();

        if (is_array($hashRow)) {
            $fileContent = $hashRow['content'];
        }

        return $fileContent;
    }
public function getFileContentFromIndex($hash = "")
    {
        $fileContent = false;

        $queryBuilder = Db::getQueryBuilder('tx_kesearch_index');
        $queryBuilder->getRestrictions()->removeAll();
        $hashRow = $queryBuilder
            ->select('*')
            ->from('tx_kesearch_index')
            ->where(
                $queryBuilder->expr()->eq(
                    'hash',
                    $queryBuilder->quote($hash, \PDO::PARAM_STR)
                )
            )
            ->setMaxResults(1)
            ->execute()
            ->fetch();

        if (is_array($hashRow)) {
            $fileContent = $hashRow['content'];
        }

        return $fileContent;
    }
public function getFileContentFromIndex ( $ hash = "" ) { $ fileContent = false ; $ queryBuilder = Db :: getQueryBuilder ( 'tx_kesearch_index' ) ; $ queryBuilder -> getRestrictions ( ) -> removeAll ( ) ; $ hashRow = $ queryBuilder -> select ( '*' ) -> from ( 'tx_kesearch_index' ) -> where ( $ queryBuilder -> expr ( ) -> eq ( 'hash' , $ queryBuilder -> quote ( $ hash , \ PDO :: PARAM_STR ) ) ) -> setMaxResults ( 1 ) -> execute ( ) -> fetch ( ) ; if ( is_array ( $ hashRow ) ) { $ fileContent = $ hashRow [ 'content' ] ; } return $ fileContent ; }
checks if there's an entry in the index for the given file hash. Returns the content of that entry.
@param string $hash
@return string/boolean returns false if no entry has been found, otherwise the content as string
checks if there s an entry in the index for the given file hash . Returns the content of that entry .