| ILIAS
    Release_4_1_x_branch Revision 61804
    | 
Class for storing search result. More...
 Collaboration diagram for ilUserSearchCache:
 Collaboration diagram for ilUserSearchCache:| 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 () | |
| 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 | 
| 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 | |
| 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 71 of file class.ilUserSearchCache.php.
References $ilDB, DEFAULT_SEARCH, isAnonymous(), and read().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | static | 
Get singleton instance.
public
| int | usr_id | 
Definition at line 94 of file class.ilUserSearchCache.php.
References $instance.
Referenced by ilLuceneSearchResultFilter\__construct(), ilObjGlossarySubItemListGUI\getHTML(), ilLMPresentationGUI\ilPage(), ilShopResultPresentationGUI\ilShopResultPresentationGUI(), ilLuceneAdvancedSearchGUI\initUserSearchCache(), ilLuceneSearchGUI\initUserSearchCache(), ilSearchResult\initUserSearchCache(), ilSearchGUI\initUserSearchCache(), ilAdvancedSearchGUI\initUserSearchCache(), ilGlossaryPresentationGUI\listDefinitions(), and ilWikiPageGUI\preview().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilUserSearchCache::addResult | ( | $a_result_item | ) | 
Append result.
public
| array(int,int,string) | array(ref_id,obj_id,type) | 
Definition at line 157 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 197 of file class.ilUserSearchCache.php.
| ilUserSearchCache::appendToFailed | ( | $a_ref_id | ) | 
Append failed id.
public
| int | ref_id of failed access | 
Definition at line 172 of file class.ilUserSearchCache.php.
| ilUserSearchCache::delete | ( | ) | 
Delete user entries.
public
Definition at line 391 of file class.ilUserSearchCache.php.
References $ilDB, $query, $res, and read().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilUserSearchCache::deleteCachedEntries | ( | ) | 
delete cached entries
| @return | 
Definition at line 321 of file class.ilUserSearchCache.php.
References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, deleteCachedEntriesAnonymous(), isAnonymous(), and setResultPageNumber().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilUserSearchCache::deleteCachedEntriesAnonymous | ( | ) | 
Delete cached entries for anonymous user.
Definition at line 373 of file class.ilUserSearchCache.php.
References setResultPageNumber().
Referenced by deleteCachedEntries().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilUserSearchCache::getCheckedItems | ( | ) | 
Get all checked items.
public
Definition at line 221 of file class.ilUserSearchCache.php.
| ilUserSearchCache::getItemFilter | ( | ) | 
Definition at line 311 of file class.ilUserSearchCache.php.
References $item_filter.
Referenced by save(), and saveForAnonymous().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilUserSearchCache::getQuery | ( | ) | 
get query
Definition at line 266 of file class.ilUserSearchCache.php.
References $query.
Referenced by getUrlEncodedQuery(), save(), and saveForAnonymous().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilUserSearchCache::getResultPageNumber | ( | ) | 
get result page number
public
Definition at line 246 of file class.ilUserSearchCache.php.
| ilUserSearchCache::getResults | ( | ) | 
Get results.
public
Definition at line 133 of file class.ilUserSearchCache.php.
| ilUserSearchCache::getRoot | ( | ) | 
get root node
Definition at line 301 of file class.ilUserSearchCache.php.
Referenced by save(), and saveForAnonymous().
 Here is the caller graph for this function:
 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 275 of file class.ilUserSearchCache.php.
References $query, and getQuery().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilUserSearchCache::isAnonymous | ( | ) | 
Check if current user is anonymous user.
Definition at line 107 of file class.ilUserSearchCache.php.
References $isAnonymous.
Referenced by __construct(), deleteCachedEntries(), read(), and save().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilUserSearchCache::isChecked | ( | $a_ref_id | ) | 
Check if reference was already checked.
public
| int | ref_id | 
Definition at line 209 of file class.ilUserSearchCache.php.
| ilUserSearchCache::isFailed | ( | $a_ref_id | ) | 
check if reference has failed access
public
| int | ref_id | 
Definition at line 184 of file class.ilUserSearchCache.php.
| 
 | private | 
Read user entries.
private
Definition at line 472 of file class.ilUserSearchCache.php.
References $query, $res, $row, DB_FETCHMODE_OBJECT, isAnonymous(), readAnonymous(), setItemFilter(), setQuery(), and setRoot().
Referenced by __construct(), delete(), and switchSearchType().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Read from session for anonymous user.
Definition at line 511 of file class.ilUserSearchCache.php.
References $_SESSION, $search_type, setItemFilter(), setQuery(), and setRoot().
Referenced by read().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilUserSearchCache::save | ( | ) | 
Save entries.
public
Definition at line 410 of file class.ilUserSearchCache.php.
References $ilDB, $ilLog, $query, $res, getItemFilter(), getQuery(), getRoot(), isAnonymous(), and saveForAnonymous().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilUserSearchCache::saveForAnonymous | ( | ) | 
Definition at line 447 of file class.ilUserSearchCache.php.
References $_SESSION, $checked, $failed, $page_number, $search_result, $search_type, getItemFilter(), getQuery(), getRoot(), and LAST_QUERY.
Referenced by save().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilUserSearchCache::setItemFilter | ( | $a_filter | ) | 
Definition at line 306 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
 Here is the caller graph for this function:
 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 256 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilUserSearchCache::setResultPageNumber | ( | $a_number | ) | 
Set result page number.
public
Definition at line 232 of file class.ilUserSearchCache.php.
Referenced by deleteCachedEntries(), and deleteCachedEntriesAnonymous().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 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 145 of file class.ilUserSearchCache.php.
| ilUserSearchCache::setRoot | ( | $a_root | ) | 
set root node of search
| int | root id | 
Definition at line 291 of file class.ilUserSearchCache.php.
Referenced by read(), and readAnonymous().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilUserSearchCache::switchSearchType | ( | $a_type | ) | 
switch to search type reads entries from database
public
| int | search type | 
Definition at line 120 of file class.ilUserSearchCache.php.
References read().
 Here is the call graph for this function:
 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 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 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 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::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.