src/snac/server/database/DBUtil.php
/**
     * Search Resources
     *
     * Searches the resources and returns an array of Resource objects.
     *
     * @param string $query search string
     * @param boolean $urlOnly optional Whether to only search on URL
     * @return \snac\data\Resource list of results
     */
Search Resources
Searches the resources and returns an array of Resource objects.

@param string $query search string
@param boolean $urlOnly optional Whether to only search on URL
@return \snac\data\Resource list of results
Search Resources Searches the resources and returns an array of Resource objects . @param string $query search string @param boolean $urlOnly optional Whether to only search on URL @return \ snac \ data \ Resource list of results
public function searchResources($query, $urlOnly = false) {
        $results = $this->sql->searchResources($query, $urlOnly);
        $return = array();
        foreach ($results as $result) {
            $resource = new \snac\data\Resource();
            $resource->setID($result['id']);
            $resource->setVersion($result['version']);
            $resource->setDocumentType($this->populateTerm($result['type']));
            $resource->setLink($result['href']);
            $resource->setSource($result['object_xml_wrap']);
            $resource->setTitle($result['title']);
            $resource->setExtent($result['extent']);
            $resource->setAbstract($result['abstract']);
            $resource->setDate($result['date']);
            $resource->setDisplayEntry($result['displayEntry']);
            $resource->setRepository($this->readPublishedConstellationByID($result['repo_ic_id'], DBUtil::$READ_REPOSITORY_SUMMARY));
            array_push($return, $resource);
        }
        return $return;
    }
public function searchResources ( $ query , $ urlOnly = false ) { $ results = $ this -> sql -> searchResources ( $ query , $ urlOnly ) ; $ return = array ( ) ; foreach ( $ results as $ result ) { $ resource = new \ snac \ data \ Resource ( ) ; $ resource -> setID ( $ result [ 'id' ] ) ; $ resource -> setVersion ( $ result [ 'version' ] ) ; $ resource -> setDocumentType ( $ this -> populateTerm ( $ result [ 'type' ] ) ) ; $ resource -> setLink ( $ result [ 'href' ] ) ; $ resource -> setSource ( $ result [ 'object_xml_wrap' ] ) ; $ resource -> setTitle ( $ result [ 'title' ] ) ; $ resource -> setExtent ( $ result [ 'extent' ] ) ; $ resource -> setAbstract ( $ result [ 'abstract' ] ) ; $ resource -> setDate ( $ result [ 'date' ] ) ; $ resource -> setDisplayEntry ( $ result [ 'displayEntry' ] ) ; $ resource -> setRepository ( $ this -> readPublishedConstellationByID ( $ result [ 'repo_ic_id' ] , DBUtil :: $ READ_REPOSITORY_SUMMARY ) ) ; array_push ( $ return , $ resource ) ; } return $ return ; }
Search Resources
 Searches the resources and returns an array of Resource objects.
Search Resources Searches the resources and returns an array of Resource objects .