|
ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
|
Class for storing search result. More...
Collaboration diagram for ilUserSearchCache:Public Member Functions | |
| isAnonymous () | |
| Check if current user is anonymous user. More... | |
| switchSearchType (int $a_type) | |
| switch to search type reads entries from database More... | |
| getResults () | |
| Get results. More... | |
| setResults (array $a_results) | |
| Set results. More... | |
| addResult (array $a_result_item) | |
| Append result. More... | |
| appendToFailed (int $a_ref_id) | |
| Append failed id. More... | |
| isFailed (int $a_ref_id) | |
| check if reference has failed access More... | |
| appendToChecked (int $a_ref_id, int $a_obj_id) | |
| Append checked id. More... | |
| isChecked (int $a_ref_id) | |
| Check if reference was already checked. More... | |
| getCheckedItems () | |
| Get all checked items public. More... | |
| setResultPageNumber (int $a_number) | |
| Set result page number. More... | |
| getResultPageNumber () | |
| get result page number More... | |
| setQuery ($a_query) | |
| set query More... | |
| getQuery () | |
| getUrlEncodedQuery () | |
| Urlencode query for further use in e.g glossariers (highlighting off search terms). More... | |
| setRoot (int $a_root) | |
| set root node of search More... | |
| getRoot () | |
| get root node More... | |
| setItemFilter (array $a_filter) | |
| getItemFilter () | |
| setMimeFilter (array $a_filter) | |
| getMimeFilter () | |
| setCreationFilter (array $a_filter) | |
| getCreationFilter () | |
| deleteCachedEntries () | |
| delete cached entries More... | |
| deleteCachedEntriesAnonymous () | |
| Delete cached entries for anonymous user. More... | |
| delete () | |
| save () | |
| saveForAnonymous () | |
Static Public Member Functions | |
| static | _getInstance (int $a_usr_id) |
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 |
Protected Attributes | |
| ilDBInterface | $db |
Private Member Functions | |
| __construct (int $a_usr_id) | |
| Constructor. More... | |
| read () | |
| Read user entries. More... | |
| readAnonymous () | |
| Read from session for anonymous user. More... | |
Private Attributes | |
| int | $usr_id |
| int | $search_type = self::DEFAULT_SEARCH |
| array | $search_result = array() |
| array | $checked = array() |
| array | $failed = array() |
| int | $page_number = 1 |
| $query | |
| int | $root |
| array | $item_filter = array() |
| bool | $isAnonymous = false |
| array | $mime_filter = array() |
| array | $creation_filter = array() |
Static Private Attributes | |
| static ilUserSearchCache | $instance = null |
Class for storing search result.
Allows paging of result sets
Definition at line 36 of file class.ilUserSearchCache.php.
|
private |
Constructor.
private
Definition at line 77 of file class.ilUserSearchCache.php.
References $DIC, ANONYMOUS_USER_ID, isAnonymous(), read(), and ROOT_FOLDER_ID.
Here is the call graph for this function:
|
static |
Definition at line 93 of file class.ilUserSearchCache.php.
Referenced by ilLuceneSearchResultFilter\__construct(), ilSearchBaseGUI\__construct(), ilObjGlossarySubItemListGUI\getHTML(), ilLMContentRendererGUI\initSearchHighlighting(), ilLuceneUserSearchGUI\initUserSearchCache(), ilLuceneAdvancedSearchGUI\initUserSearchCache(), ilLuceneSearchGUI\initUserSearchCache(), ilSearchResult\initUserSearchCache(), ilAdvancedSearchGUI\initUserSearchCache(), ilGlossaryPresentationGUI\listDefinitions(), and ilWikiPageGUI\preview().
Here is the caller graph for this function:| ilUserSearchCache::addResult | ( | array | $a_result_item | ) |
Append result.
public
| array(int,int,string) | array(ref_id,obj_id,type) |
Definition at line 151 of file class.ilUserSearchCache.php.
| ilUserSearchCache::appendToChecked | ( | int | $a_ref_id, |
| int | $a_obj_id | ||
| ) |
Append checked id.
public
| int | checked reference id |
| int | checked obj_id |
Definition at line 183 of file class.ilUserSearchCache.php.
| ilUserSearchCache::appendToFailed | ( | int | $a_ref_id | ) |
Append failed id.
Definition at line 162 of file class.ilUserSearchCache.php.
| ilUserSearchCache::delete | ( | ) |
Definition at line 378 of file class.ilUserSearchCache.php.
References $query, $res, and read().
Here is the call graph for this function:| ilUserSearchCache::deleteCachedEntries | ( | ) |
delete cached entries
Definition at line 316 of file class.ilUserSearchCache.php.
References $query, $res, 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 366 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 public.
Definition at line 205 of file class.ilUserSearchCache.php.
| ilUserSearchCache::getCreationFilter | ( | ) |
Definition at line 307 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 287 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 297 of file class.ilUserSearchCache.php.
References $mime_filter.
Referenced by save(), and saveForAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::getQuery | ( | ) |
Definition at line 244 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
Definition at line 226 of file class.ilUserSearchCache.php.
| ilUserSearchCache::getResults | ( | ) |
| ilUserSearchCache::getRoot | ( | ) |
get root node
Definition at line 277 of file class.ilUserSearchCache.php.
References ROOT_FOLDER_ID.
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 255 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 105 of file class.ilUserSearchCache.php.
References $isAnonymous.
Referenced by __construct(), deleteCachedEntries(), read(), and save().
Here is the caller graph for this function:| ilUserSearchCache::isChecked | ( | int | $a_ref_id | ) |
Check if reference was already checked.
public
| int | ref_id |
Definition at line 195 of file class.ilUserSearchCache.php.
| ilUserSearchCache::isFailed | ( | int | $a_ref_id | ) |
check if reference has failed access
Definition at line 170 of file class.ilUserSearchCache.php.
|
private |
Read user entries.
private
Definition at line 452 of file class.ilUserSearchCache.php.
References $query, $res, ilDBConstants\FETCHMODE_OBJECT, ILIAS\Repository\int(), isAnonymous(), readAnonymous(), setCreationFilter(), setItemFilter(), 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 488 of file class.ilUserSearchCache.php.
References ilSession\get(), ILIAS\Repository\int(), ROOT_FOLDER_ID, 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 | ( | ) |
Definition at line 389 of file class.ilUserSearchCache.php.
References $query, $res, getCreationFilter(), getItemFilter(), getMimeFilter(), getQuery(), getRoot(), isAnonymous(), and saveForAnonymous().
Here is the call graph for this function:| ilUserSearchCache::saveForAnonymous | ( | ) |
Definition at line 428 of file class.ilUserSearchCache.php.
References $checked, $failed, $page_number, $search_result, $search_type, ilSession\clear(), getCreationFilter(), getItemFilter(), getMimeFilter(), getQuery(), getRoot(), and ilSession\set().
Referenced by save().
Here is the call graph for this function:
Here is the caller graph for this function:| ilUserSearchCache::setCreationFilter | ( | array | $a_filter | ) |
Definition at line 302 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::setItemFilter | ( | array | $a_filter | ) |
Definition at line 282 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::setMimeFilter | ( | array | $a_filter | ) |
Definition at line 292 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 236 of file class.ilUserSearchCache.php.
Referenced by readAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::setResultPageNumber | ( | int | $a_number | ) |
Set result page number.
public
Definition at line 216 of file class.ilUserSearchCache.php.
Referenced by deleteCachedEntries(), and deleteCachedEntriesAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::setResults | ( | array | $a_results | ) |
Set results.
public
| array(int | => array(int,int,string)) array(ref_id => array(ref_id,obj_id,type)) |
Definition at line 139 of file class.ilUserSearchCache.php.
| ilUserSearchCache::setRoot | ( | int | $a_root | ) |
set root node of search
Definition at line 268 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
Here is the caller graph for this function:| ilUserSearchCache::switchSearchType | ( | int | $a_type | ) |
switch to search type reads entries from database
Definition at line 114 of file class.ilUserSearchCache.php.
References read().
Here is the call graph for this function:
|
private |
Definition at line 55 of file class.ilUserSearchCache.php.
Referenced by saveForAnonymous().
|
private |
Definition at line 67 of file class.ilUserSearchCache.php.
Referenced by getCreationFilter().
|
protected |
Definition at line 49 of file class.ilUserSearchCache.php.
|
private |
Definition at line 56 of file class.ilUserSearchCache.php.
Referenced by saveForAnonymous().
|
staticprivate |
Definition at line 48 of file class.ilUserSearchCache.php.
|
private |
Definition at line 65 of file class.ilUserSearchCache.php.
Referenced by isAnonymous().
|
private |
Definition at line 64 of file class.ilUserSearchCache.php.
Referenced by getItemFilter().
|
private |
Definition at line 66 of file class.ilUserSearchCache.php.
Referenced by getMimeFilter().
|
private |
Definition at line 57 of file class.ilUserSearchCache.php.
Referenced by saveForAnonymous().
|
private |
Definition at line 62 of file class.ilUserSearchCache.php.
Referenced by delete(), deleteCachedEntries(), getQuery(), getUrlEncodedQuery(), read(), and save().
|
private |
Definition at line 63 of file class.ilUserSearchCache.php.
|
private |
Definition at line 54 of file class.ilUserSearchCache.php.
Referenced by saveForAnonymous().
|
private |
Definition at line 52 of file class.ilUserSearchCache.php.
Referenced by saveForAnonymous().
|
private |
Definition at line 51 of file class.ilUserSearchCache.php.
| const ilUserSearchCache::ADVANCED_MD_SEARCH = 4 |
Definition at line 40 of file class.ilUserSearchCache.php.
Referenced by ilAdvancedSearchGUI\initSearchType(), ilAdvancedSearchGUI\performAdvMDSearch(), ilAdvancedSearchGUI\performSearch(), and ilAdvancedSearchGUI\showSavedAdvMDResults().
| const ilUserSearchCache::ADVANCED_SEARCH = 1 |
Definition at line 39 of file class.ilUserSearchCache.php.
Referenced by ilAdvancedSearchGUI\initSearchType(), ilAdvancedSearchGUI\initUserSearchCache(), and ilAdvancedSearchGUI\showSavedResults().
| const ilUserSearchCache::DEFAULT_SEARCH = 0 |
Definition at line 38 of file class.ilUserSearchCache.php.
| const ilUserSearchCache::LAST_QUERY = 7 |
Definition at line 44 of file class.ilUserSearchCache.php.
Referenced by ilLMContentRendererGUI\initSearchHighlighting(), ilGlossaryPresentationGUI\listDefinitions(), and ilWikiPageGUI\preview().
| const ilUserSearchCache::LUCENE_ADVANCED = 6 |
Definition at line 42 of file class.ilUserSearchCache.php.
Referenced by ilLuceneAdvancedSearchGUI\initUserSearchCache().
| const ilUserSearchCache::LUCENE_DEFAULT = 5 |
Definition at line 41 of file class.ilUserSearchCache.php.
Referenced by ilLuceneSearchGUI\initUserSearchCache().
| const ilUserSearchCache::LUCENE_USER_SEARCH = 8 |
Definition at line 46 of file class.ilUserSearchCache.php.
Referenced by ilLuceneUserSearchGUI\initUserSearchCache().