controllers/SearchController.php
/**
     * Provides returnable search result format
     * 
     * @param array $results
     * @param array $keywords
     * @return mixed
     */
Provides returnable search result format

@param array $results
@param array $keywords
@return mixed
Provides returnable search result format @param array $results @param array $keywords @return mixed
private function formatSearchResults(array $results, $keywords) {
        foreach ($results as $key => $row) {
            $titleCol = ProgramDetails_DBTable::TITLE;
            $descCol = ProgramDetails_DBTable::DESCRIPTION;
            $row[$titleCol] = $this->highlightMatchingText($row[$titleCol], $keywords);
            $row[$descCol] = $this->highlightMatchingText($row[$descCol], $keywords);
            $results[$key] = $row;
        }
        return $results;
    }
private function formatSearchResults ( array $ results , $ keywords ) { foreach ( $ results as $ key => $ row ) { $ titleCol = ProgramDetails_DBTable :: TITLE ; $ descCol = ProgramDetails_DBTable :: DESCRIPTION ; $ row [ $ titleCol ] = $ this -> highlightMatchingText ( $ row [ $ titleCol ] , $ keywords ) ; $ row [ $ descCol ] = $ this -> highlightMatchingText ( $ row [ $ descCol ] , $ keywords ) ; $ results [ $ key ] = $ row ; } return $ results ; }
Provides returnable search result format
Provides returnable search result format