ILIAS
Release_4_4_x_branch Revision 61816
|
Class for storing search result. More...
Public Member Functions | |
isAnonymous () | |
Check if current user is anonymous user. | |
switchSearchType ($a_type) | |
switch to search type reads entries from database | |
getResults () | |
Get results. | |
setResults ($a_results) | |
Set results. | |
addResult ($a_result_item) | |
Append result. | |
appendToFailed ($a_ref_id) | |
Append failed id. | |
isFailed ($a_ref_id) | |
check if reference has failed access | |
appendToChecked ($a_ref_id, $a_obj_id) | |
Append checked id. | |
isChecked ($a_ref_id) | |
Check if reference was already checked. | |
getCheckedItems () | |
Get all checked items. | |
setResultPageNumber ($a_number) | |
Set result page number. | |
getResultPageNumber () | |
get result page number | |
setQuery ($a_query) | |
set query | |
getQuery () | |
get query | |
getUrlEncodedQuery () | |
Urlencode query for further use in e.g glossariers (highlighting off search terms). | |
setRoot ($a_root) | |
set root node of search | |
getRoot () | |
get root node | |
setItemFilter ($a_filter) | |
getItemFilter () | |
setMimeFilter ($a_filter) | |
getMimeFilter () | |
deleteCachedEntries () | |
delete cached entries | |
deleteCachedEntriesAnonymous () | |
Delete cached entries for anonymous user. | |
delete () | |
Delete user entries. | |
save () | |
Save entries. | |
saveForAnonymous () |
Static Public Member Functions | |
static | _getInstance ($a_usr_id) |
Get singleton instance. |
Data Fields | |
const | DEFAULT_SEARCH = 0 |
const | ADVANCED_SEARCH = 1 |
const | SHOP_CONTENT = 2 |
const | SHOP_ADVANCED_SEARCH = 3 |
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. | |
read () | |
Read user entries. | |
readAnonymous () | |
Read from session for anonymous user. |
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() |
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 77 of file class.ilUserSearchCache.php.
References DEFAULT_SEARCH, isAnonymous(), and read().
|
static |
Get singleton instance.
public
int | usr_id |
Definition at line 100 of file class.ilUserSearchCache.php.
References $instance.
Referenced by ilLuceneSearchResultFilter\__construct(), ilObjGlossarySubItemListGUI\getHTML(), ilLMPresentationGUI\ilPage(), ilShopResultPresentationGUI\ilShopResultPresentationGUI(), 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 163 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 203 of file class.ilUserSearchCache.php.
ilUserSearchCache::appendToFailed | ( | $a_ref_id | ) |
Append failed id.
public
int | ref_id of failed access |
Definition at line 178 of file class.ilUserSearchCache.php.
ilUserSearchCache::delete | ( | ) |
Delete user entries.
public
Definition at line 407 of file class.ilUserSearchCache.php.
References $query, $res, and read().
ilUserSearchCache::deleteCachedEntries | ( | ) |
delete cached entries
@return |
Definition at line 337 of file class.ilUserSearchCache.php.
References $query, $res, $row, DB_FETCHMODE_OBJECT, deleteCachedEntriesAnonymous(), isAnonymous(), and setResultPageNumber().
ilUserSearchCache::deleteCachedEntriesAnonymous | ( | ) |
Delete cached entries for anonymous user.
Definition at line 389 of file class.ilUserSearchCache.php.
References setResultPageNumber().
Referenced by deleteCachedEntries().
ilUserSearchCache::getCheckedItems | ( | ) |
Get all checked items.
public
Definition at line 227 of file class.ilUserSearchCache.php.
ilUserSearchCache::getItemFilter | ( | ) |
Definition at line 317 of file class.ilUserSearchCache.php.
References $item_filter.
Referenced by save(), and saveForAnonymous().
ilUserSearchCache::getMimeFilter | ( | ) |
Definition at line 327 of file class.ilUserSearchCache.php.
References $mime_filter.
Referenced by save(), and saveForAnonymous().
ilUserSearchCache::getQuery | ( | ) |
get query
Definition at line 272 of file class.ilUserSearchCache.php.
References $query.
Referenced by getUrlEncodedQuery(), save(), and saveForAnonymous().
ilUserSearchCache::getResultPageNumber | ( | ) |
get result page number
public
Definition at line 252 of file class.ilUserSearchCache.php.
ilUserSearchCache::getResults | ( | ) |
Get results.
public
Definition at line 139 of file class.ilUserSearchCache.php.
ilUserSearchCache::getRoot | ( | ) |
get root node
Definition at line 307 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 281 of file class.ilUserSearchCache.php.
References $query, and getQuery().
ilUserSearchCache::isAnonymous | ( | ) |
Check if current user is anonymous user.
Definition at line 113 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 215 of file class.ilUserSearchCache.php.
ilUserSearchCache::isFailed | ( | $a_ref_id | ) |
check if reference has failed access
public
int | ref_id |
Definition at line 190 of file class.ilUserSearchCache.php.
|
private |
Read user entries.
private
Definition at line 491 of file class.ilUserSearchCache.php.
References $query, $res, $row, DB_FETCHMODE_OBJECT, isAnonymous(), readAnonymous(), setItemFilter(), setQuery(), and setRoot().
Referenced by __construct(), delete(), and switchSearchType().
|
private |
Read from session for anonymous user.
Definition at line 530 of file class.ilUserSearchCache.php.
References $_SESSION, $search_type, setItemFilter(), setMimeFilter(), setQuery(), and setRoot().
Referenced by read().
ilUserSearchCache::save | ( | ) |
Save entries.
public
Definition at line 426 of file class.ilUserSearchCache.php.
References $ilLog, $query, $res, getItemFilter(), getMimeFilter(), getQuery(), getRoot(), isAnonymous(), and saveForAnonymous().
ilUserSearchCache::saveForAnonymous | ( | ) |
Definition at line 465 of file class.ilUserSearchCache.php.
References $_SESSION, $checked, $failed, $page_number, $search_result, $search_type, getItemFilter(), getMimeFilter(), getQuery(), getRoot(), and LAST_QUERY.
Referenced by save().
ilUserSearchCache::setItemFilter | ( | $a_filter | ) |
Definition at line 312 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
ilUserSearchCache::setMimeFilter | ( | $a_filter | ) |
Definition at line 322 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 262 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
ilUserSearchCache::setResultPageNumber | ( | $a_number | ) |
Set result page number.
public
Definition at line 238 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 151 of file class.ilUserSearchCache.php.
ilUserSearchCache::setRoot | ( | $a_root | ) |
set root node of search
int | root id |
Definition at line 297 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 126 of file class.ilUserSearchCache.php.
References read().
|
private |
Definition at line 56 of file class.ilUserSearchCache.php.
Referenced by saveForAnonymous().
|
private |
Definition at line 50 of file class.ilUserSearchCache.php.
|
private |
Definition at line 57 of file class.ilUserSearchCache.php.
Referenced by saveForAnonymous().
|
staticprivate |
Definition at line 49 of file class.ilUserSearchCache.php.
Referenced by _getInstance().
|
private |
Definition at line 64 of file class.ilUserSearchCache.php.
Referenced by isAnonymous().
|
private |
Definition at line 62 of file class.ilUserSearchCache.php.
Referenced by getItemFilter().
|
private |
Definition at line 67 of file class.ilUserSearchCache.php.
Referenced by getMimeFilter().
|
private |
Definition at line 58 of file class.ilUserSearchCache.php.
Referenced by saveForAnonymous().
|
private |
Definition at line 59 of file class.ilUserSearchCache.php.
Referenced by delete(), deleteCachedEntries(), getQuery(), getUrlEncodedQuery(), read(), and save().
|
private |
Definition at line 60 of file class.ilUserSearchCache.php.
|
private |
Definition at line 55 of file class.ilUserSearchCache.php.
Referenced by saveForAnonymous().
|
private |
Definition at line 53 of file class.ilUserSearchCache.php.
Referenced by readAnonymous(), and saveForAnonymous().
|
private |
Definition at line 52 of file class.ilUserSearchCache.php.
const ilUserSearchCache::ADVANCED_MD_SEARCH = 4 |
Definition at line 41 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 45 of file class.ilUserSearchCache.php.
Referenced by ilLMPresentationGUI\ilPage(), ilGlossaryPresentationGUI\listDefinitions(), ilWikiPageGUI\preview(), and saveForAnonymous().
const ilUserSearchCache::LUCENE_ADVANCED = 6 |
Definition at line 43 of file class.ilUserSearchCache.php.
Referenced by ilLuceneAdvancedSearchGUI\initUserSearchCache().
const ilUserSearchCache::LUCENE_DEFAULT = 5 |
Definition at line 42 of file class.ilUserSearchCache.php.
Referenced by ilLuceneSearchGUI\initUserSearchCache().
const ilUserSearchCache::LUCENE_USER_SEARCH = 8 |
Definition at line 47 of file class.ilUserSearchCache.php.
Referenced by ilLuceneUserSearchGUI\initUserSearchCache().
const ilUserSearchCache::SHOP_ADVANCED_SEARCH = 3 |
Definition at line 40 of file class.ilUserSearchCache.php.
const ilUserSearchCache::SHOP_CONTENT = 2 |
Definition at line 39 of file class.ilUserSearchCache.php.