| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Source view] [Print] [Project Stats]
Global Search Engine for Moodle
| Author: | Michael Champanis (mchampan) [cynnical@gmail.com], Valery Fremaux [valery.fremaux@club-internet.fr] > 1.8 |
| License: | http://www.gnu.org/copyleft/gpl.html GNU Public License |
| File Size: | 474 lines (13 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
SearchResult:: (0 methods):
SearchCache:: (7 methods):
__construct()
can_cache()
cache()
exists()
clear()
fetch()
store()
SearchQuery:: (14 methods):
__construct()
set_query()
results()
process_results()
get_results()
page_numbers()
can_display()
count()
is_valid()
is_valid_query()
is_valid_index()
total_pages()
get_pagenumber()
get_results_per_page()
Class: SearchCache - X-Ref
split this into Cache class and extend to SearchCache?| __construct($mode = 'session') X-Ref |
| No description |
| can_cache() X-Ref |
| returns the search cache status return: boolean |
| cache($id = false, $object = false) X-Ref |
| No description |
| exists($id) X-Ref |
| do key exist in cache ? param: id the object key return: boolean |
| clear($id) X-Ref |
| clears a cached object in cache param: the object key to clear return: void |
| fetch($id) X-Ref |
| fetches a cached object param: id the object identifier return: the object cached |
| store($id, $object) X-Ref |
| put an object in cache param: id the key for that object param: object the object to cache as a serialized value return: void |
Class: SearchQuery - X-Ref
Represents a single query with results| __construct($term = '', $page = 1, $results_per_page = 10, $cache = false) X-Ref |
| constructor records query parameters |
| set_query($term = '') X-Ref |
| determines state of query object depending on query entry and tries to lauch search if all is OK return: void (this is only a state changing trigger). |
| results() X-Ref |
| accessor to the result table. return: an array of result records |
| process_results($all=false) X-Ref |
| do the effective collection of results param: boolean $all |
| get_results() X-Ref |
| get results of a search query using a caching strategy if available return: the result documents as an array of search objects |
| page_numbers() X-Ref |
| constructs the results paging links on results. return: string the results paging links |
| can_display(&$user, $this_id, $doctype, $course_id, $group_id, $path, $item_type, $context_id) X-Ref |
| can the user see this result ? param: user a reference upon the user to be checked for access param: this_id the item identifier param: doctype the search document type. MAtches the module or block or param: course_id the course reference of the searched result param: group_id the group identity attached to the found resource param: path the path that routes to the local lib.php of the searched param: item_type a subclassing information for complex module data models |
| count() X-Ref |
| No description |
| is_valid() X-Ref |
| No description |
| is_valid_query() X-Ref |
| No description |
| is_valid_index() X-Ref |
| No description |
| total_pages() X-Ref |
| No description |
| get_pagenumber() X-Ref |
| No description |
| get_results_per_page() X-Ref |
| No description |
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |