|
ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Collaboration diagram for ilSearchResult:Public Member Functions | |
| __construct ($a_user_id=0) | |
| Constructor @access public. More... | |
| setRequiredPermission ($a_permission) | |
| Set the required permission for the rbac checks in function 'filter()'. More... | |
| getRequiredPermission () | |
| setUserId ($a_user_id) | |
| getUserId () | |
| getEntries () | |
| isLimitReached () | |
| setMaxHits ($a_max_hits) | |
| getMaxHits () | |
| isOffsetReached ($a_counter) | |
| Check if offset is reached. More... | |
| addEntry ($a_obj_id, $a_type, $found, $a_child_id=0) | |
| add search result entry Entries are stored with 'obj_id'. More... | |
| numEntries () | |
| Check number of entries @access public. More... | |
| mergeEntries (&$result_obj) | |
| merge entries of this instance and another result object More... | |
| diffEntriesFromResult (&$result_obj) | |
| diff entries of this instance and another result object Used for search in results More... | |
| intersectEntries (&$result_obj) | |
| Build intersection of entries (all entries that are present in both result sets) More... | |
| addResult ($a_ref_id, $a_obj_id, $a_type) | |
| add search result Results are stored with 'ref_id'. More... | |
| getResults () | |
| getResultIds () | |
| get result ids More... | |
| getResultsByObjId () | |
| getUniqueResults () | |
| Get unique results. More... | |
| getResultsForPresentation () | |
| getSubitemIds () | |
| filter ($a_root_node, $check_and) | |
| Filter search result. More... | |
| filterResults ($a_root_node) | |
| Filter search area of result set @access public. More... | |
| save ($a_type=DEFAULT_SEARCH) | |
| Save search results. More... | |
| read ($a_type=DEFAULT_SEARCH) | |
| read search results More... | |
| __updateEntryChilds ($a_obj_id, $a_childs) | |
| Update childs for a specific entry. More... | |
| __updateResultChilds ($a_ref_id, $a_childs) | |
| Update childs for a specific result. More... | |
| __initSearchSettingsObject () | |
| preventOverwritingMaxhits ($a_flag=null) | |
| If you call this function and pass "true" the maxhits setting will not be overwritten in __initSearchSettingsObject() More... | |
| addObserver (&$a_class, $a_method) | |
| The observer is used to call functions for filtering result. More... | |
| callListeners ($a_ref_id, &$a_data) | |
Data Fields | |
| $permission = 'visible' | |
| $user_id | |
| $entries = array() | |
| $results = array() | |
| $observers = array() | |
| $ilias | |
| $ilAccess | |
| $limit_reached = false | |
| $result | |
Protected Member Functions | |
| initUserSearchCache () | |
| Init user search cache. More... | |
Protected Attributes | |
| $search_cache = null | |
| $offset = 0 | |
| $preventOverwritingMaxhits = false | |
Definition at line 40 of file class.ilSearchResult.php.
| ilSearchResult::__construct | ( | $a_user_id = 0 | ) |
Constructor @access public.
Definition at line 66 of file class.ilSearchResult.php.
References $ilAccess, $ilDB, $ilias, $ilUser, __initSearchSettingsObject(), and initUserSearchCache().
Here is the call graph for this function:| ilSearchResult::__initSearchSettingsObject | ( | ) |
Definition at line 523 of file class.ilSearchResult.php.
References preventOverwritingMaxhits(), and setMaxHits().
Referenced by __construct().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSearchResult::__updateEntryChilds | ( | $a_obj_id, | |
| $a_childs | |||
| ) |
Update childs for a specific entry.
| integer | object object_id |
| array | array of child ids. E.g 'pg', 'st' @access private |
Definition at line 491 of file class.ilSearchResult.php.
Referenced by diffEntriesFromResult(), intersectEntries(), and mergeEntries().
Here is the caller graph for this function:| ilSearchResult::__updateResultChilds | ( | $a_ref_id, | |
| $a_childs | |||
| ) |
Update childs for a specific result.
| integer | object ref_id |
| array | array of child ids. E.g 'pg', 'st' @access private |
Definition at line 510 of file class.ilSearchResult.php.
Referenced by filter(), and filterResults().
Here is the caller graph for this function:| ilSearchResult::addEntry | ( | $a_obj_id, | |
| $a_type, | |||
| $found, | |||
$a_child_id = 0 |
|||
| ) |
add search result entry Entries are stored with 'obj_id'.
This method is typically called to store db query results.
| integer | object object_id |
| string | obj_type 'lm' or 'crs' ... |
| array | value position of query parser words in query string |
| integer | child id e.g id of page or chapter @access public |
Definition at line 146 of file class.ilSearchResult.php.
References $a_type, and $counter.
Referenced by diffEntriesFromResult(), intersectEntries(), and mergeEntries().
Here is the caller graph for this function:| ilSearchResult::addObserver | ( | & | $a_class, |
| $a_method | |||
| ) |
The observer is used to call functions for filtering result.
Every callback function should support the following parameters: array of ids. E.g: ref_id = 5,array(obj_id = 1,type = 'crs'), The function should return true or false.
| object | class of callback function |
| string | name of callback method @access public |
Definition at line 575 of file class.ilSearchResult.php.
| ilSearchResult::addResult | ( | $a_ref_id, | |
| $a_obj_id, | |||
| $a_type | |||
| ) |
add search result Results are stored with 'ref_id'.
This method is typically called after checking access of entries.
| integer | ref_id |
| integer | obj_id |
| string | obj_type 'lm' or 'crs' ... @access public |
Definition at line 267 of file class.ilSearchResult.php.
References $a_type.
Referenced by filter(), and filterResults().
Here is the caller graph for this function:| ilSearchResult::callListeners | ( | $a_ref_id, | |
| & | $a_data | ||
| ) |
Definition at line 581 of file class.ilSearchResult.php.
Referenced by filter().
Here is the caller graph for this function:| ilSearchResult::diffEntriesFromResult | ( | & | $result_obj | ) |
diff entries of this instance and another result object Used for search in results
| object | result_obj @access public |
Definition at line 208 of file class.ilSearchResult.php.
References __updateEntryChilds(), addEntry(), and getEntries().
Here is the call graph for this function:| ilSearchResult::filter | ( | $a_root_node, | |
| $check_and | |||
| ) |
Filter search result.
Do RBAC checks.
Allows paging of results for referenced objects
@access public
| int | root node id |
| bool | check and boolean search |
Definition at line 355 of file class.ilSearchResult.php.
References $counter, $type, __updateResultChilds(), ilObject\_getAllReferences(), ilObject\_lookupType(), addResult(), callListeners(), ilAccess\checkAccessOfUser(), getEntries(), and getMaxHits().
Here is the call graph for this function:| ilSearchResult::filterResults | ( | $a_root_node | ) |
Filter search area of result set @access public.
Definition at line 444 of file class.ilSearchResult.php.
References $result, __updateResultChilds(), addResult(), and getResults().
Here is the call graph for this function:| ilSearchResult::getEntries | ( | ) |
Definition at line 105 of file class.ilSearchResult.php.
Referenced by diffEntriesFromResult(), filter(), intersectEntries(), and numEntries().
Here is the caller graph for this function:| ilSearchResult::getMaxHits | ( | ) |
Definition at line 119 of file class.ilSearchResult.php.
Referenced by filter(), and initUserSearchCache().
Here is the caller graph for this function:| ilSearchResult::getRequiredPermission | ( | ) |
| ilSearchResult::getResultIds | ( | ) |
get result ids
@access public
Definition at line 285 of file class.ilSearchResult.php.
References $id, and getResults().
Here is the call graph for this function:| ilSearchResult::getResults | ( | ) |
Definition at line 274 of file class.ilSearchResult.php.
Referenced by filterResults(), getResultIds(), getResultsByObjId(), getResultsForPresentation(), and getSubitemIds().
Here is the caller graph for this function:| ilSearchResult::getResultsByObjId | ( | ) |
Definition at line 293 of file class.ilSearchResult.php.
References getResults().
Here is the call graph for this function:| ilSearchResult::getResultsForPresentation | ( | ) |
Definition at line 322 of file class.ilSearchResult.php.
References $res, $result, and getResults().
Here is the call graph for this function:| ilSearchResult::getSubitemIds | ( | ) |
Definition at line 332 of file class.ilSearchResult.php.
References $res, $row, and getResults().
Here is the call graph for this function:| ilSearchResult::getUniqueResults | ( | ) |
Get unique results.
Return an array of obj_id (No multiple results for references) Results are stored with 'ref_id'. This method is typically called after checking access of entries. @access public
Definition at line 309 of file class.ilSearchResult.php.
References $result.
| ilSearchResult::getUserId | ( | ) |
Definition at line 100 of file class.ilSearchResult.php.
References $user_id.
Referenced by initUserSearchCache().
Here is the caller graph for this function:
|
protected |
Init user search cache.
@access private
Definition at line 539 of file class.ilSearchResult.php.
References ilUserSearchCache\_getInstance(), getMaxHits(), and getUserId().
Referenced by __construct().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSearchResult::intersectEntries | ( | & | $result_obj | ) |
Build intersection of entries (all entries that are present in both result sets)
| object | result_obj @access public |
Definition at line 235 of file class.ilSearchResult.php.
References __updateEntryChilds(), addEntry(), and getEntries().
Here is the call graph for this function:| ilSearchResult::isLimitReached | ( | ) |
Definition at line 110 of file class.ilSearchResult.php.
| ilSearchResult::isOffsetReached | ( | $a_counter | ) |
Check if offset is reached.
@access public
| int | current counter of result |
Definition at line 131 of file class.ilSearchResult.php.
| ilSearchResult::mergeEntries | ( | & | $result_obj | ) |
merge entries of this instance and another result object
| object | result_obj @access public |
Definition at line 192 of file class.ilSearchResult.php.
References __updateEntryChilds(), and addEntry().
Here is the call graph for this function:| ilSearchResult::numEntries | ( | ) |
Check number of entries @access public.
Definition at line 181 of file class.ilSearchResult.php.
References getEntries().
Here is the call graph for this function:| ilSearchResult::preventOverwritingMaxhits | ( | $a_flag = null | ) |
If you call this function and pass "true" the maxhits setting will not be overwritten in __initSearchSettingsObject()
@access public
| boolean | $a_flag | true or false to set the flag or leave blank to get the status of the flag @returmn boolean if called without parameter the status of the flag will be returned, otherwise $this |
Definition at line 555 of file class.ilSearchResult.php.
References $preventOverwritingMaxhits, and preventOverwritingMaxhits().
Referenced by __initSearchSettingsObject(), and preventOverwritingMaxhits().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSearchResult::read | ( | $a_type = DEFAULT_SEARCH | ) |
read search results
| integer | DEFAULT_SEARCH or ADVANCED_SEARCH @access public |
Definition at line 478 of file class.ilSearchResult.php.
| ilSearchResult::save | ( | $a_type = DEFAULT_SEARCH | ) |
Save search results.
| integer | DEFAULT_SEARCH or ADVANCED_SEARCH @access public |
Definition at line 467 of file class.ilSearchResult.php.
| ilSearchResult::setMaxHits | ( | $a_max_hits | ) |
Definition at line 115 of file class.ilSearchResult.php.
Referenced by __initSearchSettingsObject().
Here is the caller graph for this function:| ilSearchResult::setRequiredPermission | ( | $a_permission | ) |
Set the required permission for the rbac checks in function 'filter()'.
Definition at line 85 of file class.ilSearchResult.php.
| ilSearchResult::setUserId | ( | $a_user_id | ) |
Definition at line 96 of file class.ilSearchResult.php.
| ilSearchResult::$entries = array() |
Definition at line 45 of file class.ilSearchResult.php.
| ilSearchResult::$ilAccess |
Definition at line 54 of file class.ilSearchResult.php.
Referenced by __construct().
| ilSearchResult::$ilias |
Definition at line 53 of file class.ilSearchResult.php.
Referenced by __construct().
| ilSearchResult::$limit_reached = false |
Definition at line 57 of file class.ilSearchResult.php.
| ilSearchResult::$observers = array() |
Definition at line 47 of file class.ilSearchResult.php.
|
protected |
Definition at line 50 of file class.ilSearchResult.php.
| ilSearchResult::$permission = 'visible' |
Definition at line 42 of file class.ilSearchResult.php.
Referenced by getRequiredPermission().
|
protected |
Definition at line 60 of file class.ilSearchResult.php.
Referenced by preventOverwritingMaxhits().
| ilSearchResult::$result |
Definition at line 58 of file class.ilSearchResult.php.
Referenced by filterResults(), getResultsForPresentation(), and getUniqueResults().
| ilSearchResult::$results = array() |
Definition at line 46 of file class.ilSearchResult.php.
|
protected |
Definition at line 49 of file class.ilSearchResult.php.
| ilSearchResult::$user_id |
Definition at line 44 of file class.ilSearchResult.php.
Referenced by getUserId().