| [ 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 Campanis (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: | 328 lines (12 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
ResourceSearchDocument:: (10 methods):
__construct()
resource_make_link()
resource_iterator()
resource_get_content_for_index()
resource_get_physical_file()
resource_single_document()
resource_delete()
resource_db_names()
resource_check_text_access()
resource_link_post_processing()
Class: ResourceSearchDocument - X-Ref
| __construct(&$resource, $context_id) X-Ref |
| No description |
| resource_make_link($resource_id) X-Ref |
| constructs valid access links to information param: resourceId the of the resource return: a full featured link element as a string |
| resource_iterator() X-Ref |
| part of standard API |
| resource_get_content_for_index(&$notneeded) X-Ref |
| part of standard API this function does not need a content iterator, returns all the info itself; param: notneeded to comply API, remember to fake the iterator array though return: an array of searchable documents |
| resource_get_physical_file(&$resource, $context_id, $getsingle, &$documents = null) X-Ref |
| get text from a physical file param: resource a resource for which to fetch some representative text param: getsingle if true, returns a single search document, elsewhere return the array param: documents the array of documents, by ref, where to add the new document. return: a search document when unique or false. |
| resource_single_document($id, $itemtype) X-Ref |
| part of standard API. returns a single resource search document based on a resource_entry id param: id the id of the accessible document return: a searchable object or null if failure |
| resource_delete($info, $itemtype) X-Ref |
| dummy delete function that aggregates id with itemtype. this was here for a reason, but I can't remember it at the moment. |
| resource_db_names() X-Ref |
| returns the var names needed to build a sql query for addition/deletions |
| resource_check_text_access($path, $itemtype, $this_id, $user, $group_id, $context_id) X-Ref |
| this function handles the access policy to contents indexed as searchable documents. If this function does not exist, the search engine assumes access is allowed. param: path the access path to the module script code param: itemtype the information subclassing (usefull for complex modules, defaults to 'standard') param: this_id the item id within the information class denoted by itemtype. In resources, this id param: user the user record denoting the user who searches param: group_id the current group used by the user when searching return: true if access is allowed, false elsewhere |
| resource_link_post_processing($title) X-Ref |
| post processes the url for cleaner output. param: string $title |
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |