ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Public Member Functions | |
__construct ($a_user_id=0) | |
Constructor 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 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 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 public.
Definition at line 66 of file class.ilSearchResult.php.
References $ilAccess, $ilDB, $ilias, $ilUser, __initSearchSettingsObject(), and initUserSearchCache().
ilSearchResult::__initSearchSettingsObject | ( | ) |
Definition at line 523 of file class.ilSearchResult.php.
References preventOverwritingMaxhits(), and setMaxHits().
Referenced by __construct().
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' private |
Definition at line 491 of file class.ilSearchResult.php.
Referenced by diffEntriesFromResult(), intersectEntries(), and mergeEntries().
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' private |
Definition at line 510 of file class.ilSearchResult.php.
Referenced by filter(), and filterResults().
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 public |
Definition at line 146 of file class.ilSearchResult.php.
References $a_type, and $counter.
Referenced by diffEntriesFromResult(), intersectEntries(), and mergeEntries().
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 public |
Definition at line 575 of file class.ilSearchResult.php.
References array.
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' ... public |
Definition at line 267 of file class.ilSearchResult.php.
References $a_type.
Referenced by filter(), and filterResults().
ilSearchResult::callListeners | ( | $a_ref_id, | |
& | $a_data | ||
) |
Definition at line 581 of file class.ilSearchResult.php.
Referenced by filter().
ilSearchResult::diffEntriesFromResult | ( | & | $result_obj | ) |
diff entries of this instance and another result object Used for search in results
object | result_obj public |
Definition at line 208 of file class.ilSearchResult.php.
References __updateEntryChilds(), addEntry(), array, and getEntries().
ilSearchResult::filter | ( | $a_root_node, | |
$check_and | |||
) |
Filter search result.
Do RBAC checks.
Allows paging of results for referenced objects
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(), getMaxHits(), getRequiredPermission(), and isOffsetReached().
ilSearchResult::filterResults | ( | $a_root_node | ) |
Filter search area of result set public.
Definition at line 444 of file class.ilSearchResult.php.
References $result, __updateResultChilds(), addResult(), array, and getResults().
ilSearchResult::getEntries | ( | ) |
Definition at line 105 of file class.ilSearchResult.php.
References array.
Referenced by diffEntriesFromResult(), filter(), intersectEntries(), and numEntries().
ilSearchResult::getMaxHits | ( | ) |
Definition at line 119 of file class.ilSearchResult.php.
Referenced by filter(), and initUserSearchCache().
ilSearchResult::getRequiredPermission | ( | ) |
Definition at line 90 of file class.ilSearchResult.php.
References $permission.
Referenced by filter().
ilSearchResult::getResultIds | ( | ) |
get result ids
public
Definition at line 285 of file class.ilSearchResult.php.
References $id, array, and getResults().
ilSearchResult::getResults | ( | ) |
Definition at line 274 of file class.ilSearchResult.php.
References array.
Referenced by filterResults(), getResultIds(), getResultsByObjId(), getResultsForPresentation(), and getSubitemIds().
ilSearchResult::getResultsByObjId | ( | ) |
Definition at line 293 of file class.ilSearchResult.php.
References array, and getResults().
ilSearchResult::getResultsForPresentation | ( | ) |
Definition at line 322 of file class.ilSearchResult.php.
References $res, $result, array, and getResults().
ilSearchResult::getSubitemIds | ( | ) |
Definition at line 332 of file class.ilSearchResult.php.
References $res, $row, array, and getResults().
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. public
Definition at line 309 of file class.ilSearchResult.php.
References $result, and array.
ilSearchResult::getUserId | ( | ) |
Definition at line 100 of file class.ilSearchResult.php.
References $user_id.
Referenced by initUserSearchCache().
|
protected |
Init user search cache.
private
Definition at line 539 of file class.ilSearchResult.php.
References ilUserSearchCache\_getInstance(), getMaxHits(), and getUserId().
Referenced by __construct().
ilSearchResult::intersectEntries | ( | & | $result_obj | ) |
Build intersection of entries (all entries that are present in both result sets)
object | result_obj public |
Definition at line 235 of file class.ilSearchResult.php.
References __updateEntryChilds(), addEntry(), array, and getEntries().
ilSearchResult::isLimitReached | ( | ) |
Definition at line 110 of file class.ilSearchResult.php.
ilSearchResult::isOffsetReached | ( | $a_counter | ) |
Check if offset is reached.
public
int | current counter of result |
Definition at line 131 of file class.ilSearchResult.php.
Referenced by filter().
ilSearchResult::mergeEntries | ( | & | $result_obj | ) |
merge entries of this instance and another result object
object | result_obj public |
Definition at line 192 of file class.ilSearchResult.php.
References __updateEntryChilds(), and addEntry().
ilSearchResult::numEntries | ( | ) |
Check number of entries public.
Definition at line 181 of file class.ilSearchResult.php.
References getEntries().
ilSearchResult::preventOverwritingMaxhits | ( | $a_flag = null | ) |
If you call this function and pass "true" the maxhits setting will not be overwritten in __initSearchSettingsObject()
public
boolean | $a_flag | true or false to set the flag or leave blank to get the status of the flag 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.
Referenced by __initSearchSettingsObject().
ilSearchResult::read | ( | $a_type = DEFAULT_SEARCH | ) |
read search results
integer | DEFAULT_SEARCH or ADVANCED_SEARCH public |
Definition at line 478 of file class.ilSearchResult.php.
Referenced by ilAdvancedSearchGUI\performAdvMDSearch(), ilAdvancedSearchGUI\performSearch(), ilSearchGUI\performSearch(), ilAdvancedSearchGUI\showSavedAdvMDResults(), ilSearchGUI\showSavedResults(), and ilAdvancedSearchGUI\showSavedResults().
ilSearchResult::save | ( | $a_type = DEFAULT_SEARCH | ) |
Save search results.
integer | DEFAULT_SEARCH or ADVANCED_SEARCH 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().
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().