ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class for storing search result. More...
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
Definition at line 35 of file class.ilUserSearchCache.php.
|
private |
Constructor.
private
Definition at line 80 of file class.ilUserSearchCache.php.
References $DIC, $ilDB, DEFAULT_SEARCH, isAnonymous(), and read().
|
static |
Get singleton instance.
public
int | usr_id |
Definition at line 104 of file class.ilUserSearchCache.php.
Referenced by ilLuceneSearchResultFilter\__construct(), ilObjGlossarySubItemListGUI\getHTML(), ilLMPresentationGUI\ilPage(), ilLuceneUserSearchGUI\initUserSearchCache(), ilLuceneAdvancedSearchGUI\initUserSearchCache(), ilLuceneSearchGUI\initUserSearchCache(), ilSearchResult\initUserSearchCache(), ilSearchGUI\initUserSearchCache(), ilAdvancedSearchGUI\initUserSearchCache(), ilGlossaryPresentationGUI\listDefinitions(), and ilWikiPageGUI\preview().
ilUserSearchCache::addResult | ( | $a_result_item | ) |
Append result.
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.
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.
public
int | ref_id of failed access |
Definition at line 181 of file class.ilUserSearchCache.php.
ilUserSearchCache::delete | ( | ) |
ilUserSearchCache::deleteCachedEntries | ( | ) |
delete cached entries
Definition at line 351 of file class.ilUserSearchCache.php.
References $DIC, $ilDB, $query, $res, $row, deleteCachedEntriesAnonymous(), ilDBConstants\FETCHMODE_OBJECT, isAnonymous(), and setResultPageNumber().
ilUserSearchCache::deleteCachedEntriesAnonymous | ( | ) |
Delete cached entries for anonymous user.
Definition at line 405 of file class.ilUserSearchCache.php.
References setResultPageNumber().
Referenced by deleteCachedEntries().
ilUserSearchCache::getCheckedItems | ( | ) |
Get all checked items.
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().
ilUserSearchCache::getItemFilter | ( | ) |
Definition at line 318 of file class.ilUserSearchCache.php.
References $item_filter.
Referenced by save(), and saveForAnonymous().
ilUserSearchCache::getMimeFilter | ( | ) |
Definition at line 328 of file class.ilUserSearchCache.php.
References $mime_filter.
Referenced by save(), and saveForAnonymous().
ilUserSearchCache::getQuery | ( | ) |
get query
Definition at line 274 of file class.ilUserSearchCache.php.
References $query.
Referenced by getUrlEncodedQuery(), save(), and saveForAnonymous().
ilUserSearchCache::getResultPageNumber | ( | ) |
ilUserSearchCache::getResults | ( | ) |
ilUserSearchCache::getRoot | ( | ) |
get root node
Definition at line 308 of file class.ilUserSearchCache.php.
Referenced by save(), and saveForAnonymous().
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().
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().
ilUserSearchCache::isChecked | ( | $a_ref_id | ) |
Check if reference was already checked.
public
int | ref_id |
Definition at line 218 of file class.ilUserSearchCache.php.
ilUserSearchCache::isFailed | ( | $a_ref_id | ) |
check if reference has failed access
public
int | ref_id |
Definition at line 193 of file class.ilUserSearchCache.php.
|
private |
Read user entries.
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().
|
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().
ilUserSearchCache::save | ( | ) |
Save entries.
public
Definition at line 444 of file class.ilUserSearchCache.php.
References $DIC, $ilDB, $query, $res, getCreationFilter(), getItemFilter(), getMimeFilter(), getQuery(), getRoot(), isAnonymous(), and saveForAnonymous().
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(), and getRoot().
Referenced by save().
ilUserSearchCache::setCreationFilter | ( | $a_filter | ) |
Definition at line 334 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
ilUserSearchCache::setItemFilter | ( | $a_filter | ) |
Definition at line 313 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
ilUserSearchCache::setMimeFilter | ( | $a_filter | ) |
Definition at line 323 of file class.ilUserSearchCache.php.
Referenced by readAnonymous().
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().
ilUserSearchCache::setResultPageNumber | ( | $a_number | ) |
Set result page number.
public
Definition at line 241 of file class.ilUserSearchCache.php.
Referenced by deleteCachedEntries(), and deleteCachedEntriesAnonymous().
ilUserSearchCache::setResults | ( | $a_results | ) |
Set results.
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().
ilUserSearchCache::switchSearchType | ( | $a_type | ) |
switch to search type reads entries from database
public
int | search type |
Definition at line 129 of file class.ilUserSearchCache.php.
References $a_type, and read().
|
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.
|
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 ilSearchGUI\initUserSearchCache().
const ilUserSearchCache::LAST_QUERY = 7 |
Definition at line 43 of file class.ilUserSearchCache.php.
Referenced by ilLMPresentationGUI\ilPage(), ilGlossaryPresentationGUI\listDefinitions(), and ilWikiPageGUI\preview().
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().