|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class for storing search result. More...
Collaboration diagram for ilUserSearchCache:Public Member Functions | |
| isAnonymous () | |
| Check if current user is anonymous user. More... | |
| switchSearchType ($a_type) | |
| switch to search type reads entries from database More... | |
| getResults () | |
| Get results. More... | |
| setResults ($a_results) | |
| Set results. More... | |
| addResult ($a_result_item) | |
| Append result. More... | |
| appendToFailed ($a_ref_id) | |
| Append failed id. More... | |
| isFailed ($a_ref_id) | |
| check if reference has failed access More... | |
| appendToChecked ($a_ref_id, $a_obj_id) | |
| Append checked id. More... | |
| isChecked ($a_ref_id) | |
| Check if reference was already checked. More... | |
| getCheckedItems () | |
| Get all checked items. More... | |
| setResultPageNumber ($a_number) | |
| Set result page number. More... | |
| getResultPageNumber () | |
| get result page number More... | |
| setQuery ($a_query) | |
| set query More... | |
| getQuery () | |
| get query More... | |
| getUrlEncodedQuery () | |
| Urlencode query for further use in e.g glossariers (highlighting off search terms). More... | |
| setRoot ($a_root) | |
| set root node of search More... | |
| getRoot () | |
| get root node More... | |
| setItemFilter ($a_filter) | |
| getItemFilter () | |
| setMimeFilter ($a_filter) | |
| getMimeFilter () | |
| setCreationFilter ($a_filter) | |
| getCreationFilter () | |
| deleteCachedEntries () | |
| delete cached entries More... | |
| deleteCachedEntriesAnonymous () | |
| Delete cached entries for anonymous user. More... | |
| delete () | |
| Delete user entries. More... | |
| save () | |
| Save entries. More... | |
| saveForAnonymous () | |
Static Public Member Functions | |
| static | _getInstance ($a_usr_id) |
| Get singleton instance. More... | |
Data Fields | |
| const | DEFAULT_SEARCH = 0 |
| const | ADVANCED_SEARCH = 1 |
| const | ADVANCED_MD_SEARCH = 4 |
| const | LUCENE_DEFAULT = 5 |
| const | LUCENE_ADVANCED = 6 |
| const | LAST_QUERY = 7 |
| const | LUCENE_USER_SEARCH = 8 |
Private Member Functions | |
| __construct ($a_usr_id) | |
| Constructor. More... | |
| read () | |
| Read user entries. More... | |
| readAnonymous () | |
| Read from session for anonymous user. More... | |
Private Attributes | |
| $db | |
| $usr_id | |
| $search_type = self::DEFAULT_SEARCH | |
| $search_result = array() | |
| $checked = array() | |
| $failed = array() | |
| $page_number = 1 | |
| $query | |
| $root = ROOT_FOLDER_ID | |
| $item_filter = array() | |
| $isAnonymous = false | |
| $mime_filter = array() | |
| $creation_filter = array() | |
Static Private Attributes | |
| static | $instance = null |
Class for storing search result.
Allows paging of result sets
@ilCtrl_Calls
Definition at line 35 of file class.ilUserSearchCache.php.
|
private |
Constructor.
@access private
Definition at line 80 of file class.ilUserSearchCache.php.
References $DIC, $ilDB, DEFAULT_SEARCH, isAnonymous(), and read().
Here is the call graph for this function:
|
static |
Get singleton instance.
@access public
| int | usr_id |
Definition at line 104 of file class.ilUserSearchCache.php.
References $instance.
Referenced by ilLuceneSearchResultFilter\__construct(), ilObjGlossarySubItemListGUI\getHTML(), ilLMPresentationGUI\ilPage(), ilAdvancedSearchGUI\initUserSearchCache(), ilSearchGUI\initUserSearchCache(), ilSearchResult\initUserSearchCache(), ilLuceneAdvancedSearchGUI\initUserSearchCache(), ilLuceneSearchGUI\initUserSearchCache(), ilLuceneUserSearchGUI\initUserSearchCache(), ilGlossaryPresentationGUI\listDefinitions(), and ilWikiPageGUI\preview().
Here is the caller graph for this function:| ilUserSearchCache::addResult | ( | $a_result_item | ) |
Append result.
@access public
| array(int,int,string) | array(ref_id,obj_id,type) |
Definition at line 166 of file class.ilUserSearchCache.php.
| ilUserSearchCache::appendToChecked | ( | $a_ref_id, | |
| $a_obj_id | |||
| ) |
Append checked id.
@access public
| int | checked reference id |
| int | checked obj_id |
Definition at line 206 of file class.ilUserSearchCache.php.
| ilUserSearchCache::appendToFailed | ( | $a_ref_id | ) |
Append failed id.
@access public
| int | ref_id of failed access |
Definition at line 181 of file class.ilUserSearchCache.php.
| ilUserSearchCache::delete | ( | ) |
Delete user entries.
@access public
Definition at line 423 of file class.ilUserSearchCache.php.
References $DIC, $ilDB, $query, $res, and read().
Here is the call graph for this function:| ilUserSearchCache::deleteCachedEntries | ( | ) |
delete cached entries
return
Definition at line 351 of file class.ilUserSearchCache.php.
References $DIC, $ilDB, $query, $res, $row, deleteCachedEntriesAnonymous(), ilDBConstants\FETCHMODE_OBJECT, isAnonymous(), and setResultPageNumber().
Here is the call graph for this function:| ilUserSearchCache::deleteCachedEntriesAnonymous | ( | ) |
Delete cached entries for anonymous user.
Definition at line 405 of file class.ilUserSearchCache.php.
References setResultPageNumber().
Referenced by deleteCachedEntries().
Here is the call graph for this function:
Here is the caller graph for this function:| ilUserSearchCache::getCheckedItems | ( | ) |
Get all checked items.
@access public
Definition at line 230 of file class.ilUserSearchCache.php.
| ilUserSearchCache::getCreationFilter | ( | ) |
Definition at line 339 of file class.ilUserSearchCache.php.
References $creation_filter.
Referenced by save(), and saveForAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::getItemFilter | ( | ) |
Definition at line 318 of file class.ilUserSearchCache.php.
References $item_filter.
Referenced by save(), and saveForAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::getMimeFilter | ( | ) |
Definition at line 328 of file class.ilUserSearchCache.php.
References $mime_filter.
Referenced by save(), and saveForAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::getQuery | ( | ) |
get query
Definition at line 274 of file class.ilUserSearchCache.php.
References $query.
Referenced by getUrlEncodedQuery(), save(), and saveForAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::getResultPageNumber | ( | ) |
get result page number
@access public
Definition at line 254 of file class.ilUserSearchCache.php.
| ilUserSearchCache::getResults | ( | ) |
Get results.
@access public
Definition at line 142 of file class.ilUserSearchCache.php.
| ilUserSearchCache::getRoot | ( | ) |
get root node
Definition at line 308 of file class.ilUserSearchCache.php.
Referenced by save(), and saveForAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::getUrlEncodedQuery | ( | ) |
Urlencode query for further use in e.g glossariers (highlighting off search terms).
Definition at line 283 of file class.ilUserSearchCache.php.
References $query, and getQuery().
Here is the call graph for this function:| ilUserSearchCache::isAnonymous | ( | ) |
Check if current user is anonymous user.
Definition at line 116 of file class.ilUserSearchCache.php.
References $isAnonymous.
Referenced by __construct(), deleteCachedEntries(), read(), and save().
Here is the caller graph for this function:| ilUserSearchCache::isChecked | ( | $a_ref_id | ) |
Check if reference was already checked.
@access public
| int | ref_id |
Definition at line 218 of file class.ilUserSearchCache.php.
| ilUserSearchCache::isFailed | ( | $a_ref_id | ) |
check if reference has failed access
@access public
| int | ref_id |
Definition at line 193 of file class.ilUserSearchCache.php.
|
private |
Read user entries.
@access private
Definition at line 512 of file class.ilUserSearchCache.php.
References $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, isAnonymous(), readAnonymous(), setCreationFilter(), setItemFilter(), setQuery(), and setRoot().
Referenced by __construct(), delete(), and switchSearchType().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Read from session for anonymous user.
Definition at line 548 of file class.ilUserSearchCache.php.
References $_SESSION, $search_type, setCreationFilter(), setItemFilter(), setMimeFilter(), setQuery(), and setRoot().
Referenced by read().
Here is the call graph for this function:
Here is the caller graph for this function:| ilUserSearchCache::save | ( | ) |
Save entries.
@access public
Definition at line 444 of file class.ilUserSearchCache.php.
References $DIC, $ilDB, $query, $res, getCreationFilter(), getItemFilter(), getMimeFilter(), getQuery(), getRoot(), isAnonymous(), and saveForAnonymous().
Here is the call graph for this function:| ilUserSearchCache::saveForAnonymous | ( | ) |
Definition at line 486 of file class.ilUserSearchCache.php.
References $_SESSION, $checked, $failed, $page_number, $search_result, $search_type, getCreationFilter(), getItemFilter(), getMimeFilter(), getQuery(), getRoot(), and LAST_QUERY.
Referenced by save().
Here is the call graph for this function:
Here is the caller graph for this function:| ilUserSearchCache::setCreationFilter | ( | $a_filter | ) |
Definition at line 334 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::setItemFilter | ( | $a_filter | ) |
Definition at line 313 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::setMimeFilter | ( | $a_filter | ) |
Definition at line 323 of file class.ilUserSearchCache.php.
Referenced by readAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::setQuery | ( | $a_query | ) |
set query
| mixed | query string or array (for advanced search) |
Definition at line 264 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::setResultPageNumber | ( | $a_number | ) |
Set result page number.
@access public
Definition at line 241 of file class.ilUserSearchCache.php.
Referenced by deleteCachedEntries(), and deleteCachedEntriesAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::setResults | ( | $a_results | ) |
Set results.
@access public
| array(int | => array(int,int,string)) array(ref_id => array(ref_id,obj_id,type)) |
Definition at line 154 of file class.ilUserSearchCache.php.
| ilUserSearchCache::setRoot | ( | $a_root | ) |
set root node of search
| int | root id |
Definition at line 298 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::switchSearchType | ( | $a_type | ) |
switch to search type reads entries from database
@access public
| int | search type |
Definition at line 129 of file class.ilUserSearchCache.php.
References $a_type, and read().
Here is the call graph for this function:
|
private |
Definition at line 54 of file class.ilUserSearchCache.php.
Referenced by saveForAnonymous().
|
private |
Definition at line 69 of file class.ilUserSearchCache.php.
Referenced by getCreationFilter().
|
private |
Definition at line 48 of file class.ilUserSearchCache.php.
|
private |
Definition at line 55 of file class.ilUserSearchCache.php.
Referenced by saveForAnonymous().
|
staticprivate |
Definition at line 47 of file class.ilUserSearchCache.php.
Referenced by _getInstance().
|
private |
Definition at line 62 of file class.ilUserSearchCache.php.
Referenced by isAnonymous().
|
private |
Definition at line 60 of file class.ilUserSearchCache.php.
Referenced by getItemFilter().
|
private |
Definition at line 65 of file class.ilUserSearchCache.php.
Referenced by getMimeFilter().
|
private |
Definition at line 56 of file class.ilUserSearchCache.php.
Referenced by saveForAnonymous().
|
private |
Definition at line 57 of file class.ilUserSearchCache.php.
Referenced by delete(), deleteCachedEntries(), getQuery(), getUrlEncodedQuery(), read(), and save().
|
private |
Definition at line 58 of file class.ilUserSearchCache.php.
|
private |
Definition at line 53 of file class.ilUserSearchCache.php.
Referenced by saveForAnonymous().
|
private |
Definition at line 51 of file class.ilUserSearchCache.php.
Referenced by readAnonymous(), and saveForAnonymous().
|
private |
Definition at line 50 of file class.ilUserSearchCache.php.
| const ilUserSearchCache::ADVANCED_MD_SEARCH = 4 |
Definition at line 39 of file class.ilUserSearchCache.php.
Referenced by ilAdvancedSearchGUI\initSearchType().
| const ilUserSearchCache::ADVANCED_SEARCH = 1 |
Definition at line 38 of file class.ilUserSearchCache.php.
Referenced by ilAdvancedSearchGUI\initSearchType(), and ilAdvancedSearchGUI\initUserSearchCache().
| const ilUserSearchCache::DEFAULT_SEARCH = 0 |
Definition at line 37 of file class.ilUserSearchCache.php.
Referenced by __construct(), and ilSearchGUI\initUserSearchCache().
| const ilUserSearchCache::LAST_QUERY = 7 |
Definition at line 43 of file class.ilUserSearchCache.php.
Referenced by ilLMPresentationGUI\ilPage(), ilGlossaryPresentationGUI\listDefinitions(), ilWikiPageGUI\preview(), and saveForAnonymous().
| const ilUserSearchCache::LUCENE_ADVANCED = 6 |
Definition at line 41 of file class.ilUserSearchCache.php.
Referenced by ilLuceneAdvancedSearchGUI\initUserSearchCache().
| const ilUserSearchCache::LUCENE_DEFAULT = 5 |
Definition at line 40 of file class.ilUserSearchCache.php.
Referenced by ilLuceneSearchGUI\initUserSearchCache().
| const ilUserSearchCache::LUCENE_USER_SEARCH = 8 |
Definition at line 45 of file class.ilUserSearchCache.php.
Referenced by ilLuceneUserSearchGUI\initUserSearchCache().