CWIS Developer Documentation
|
Public Member Functions | |
SavedSearch ($SearchId, $SearchName=NULL, $UserId=NULL, $Frequency=NULL, $SearchGroups=NULL) | |
SearchGroups ($NewSearchGroups=NULL) | |
SearchName ($NewValue=DB_NOVALUE) | |
Id () | |
Get ID of search. More... | |
UserId ($NewValue=DB_NOVALUE) | |
Get/set user ID. More... | |
Frequency ($NewValue=DB_NOVALUE) | |
Get/set search frequency. More... | |
UpdateDateLastRun () | |
DateLastRun ($NewValue=DB_NOVALUE) | |
SaveLastMatches ($ArrayofMatchingIds) | |
Save array of last matches. More... | |
LastMatches () | |
Return array of most recently matched ResourceIds for a search. More... | |
GetSearchGroupsAsUrlParameters () | |
Get search groups as URL parameters (e.g. More... | |
GetSearchGroupsAsUrlParameterArray () | |
Get search groups as an URL parameter array. More... | |
GetSearchGroupsAsTextDescription ($IncludeHtml=TRUE, $StartWithBreak=TRUE, $TruncateLongWordsTo=0) | |
Get multi-line string describing search criteria. More... | |
GetSearchFieldNames () | |
Get list of fields to be searched. More... | |
Delete () | |
Delete saved search. More... | |
GetSearchId () | |
Static Public Member Functions | |
static | TranslateSearchGroupsToUrlParameters ($SearchGroups) |
Translate search group array into URL parameters (e.g. More... | |
static | TranslateSearchGroupsToUrlParameterArray ($SearchGroups) |
Translate a search group array to an URL parameter array. More... | |
static | TranslateUrlParametersToSearchGroups ($GetVars) |
static | TranslateSearchGroupsToTextDescription ($SearchGroups, $IncludeHtml=TRUE, $StartWithBreak=TRUE, $TruncateLongWordsTo=0) |
Translate search group array into multi-line string describing search criteria. More... | |
static | TranslateSearchGroupsToSearchFieldNames ($SearchGroups) |
Extract list of fields to be searched from search group array. More... | |
static | GetSearchFrequencyList () |
Get array of possible search frequency descriptions. More... | |
Public Attributes | |
const | SEARCHFREQ_NEVER = 0 |
const | SEARCHFREQ_HOURLY = 1 |
const | SEARCHFREQ_DAILY = 2 |
const | SEARCHFREQ_WEEKLY = 3 |
const | SEARCHFREQ_BIWEEKLY = 4 |
const | SEARCHFREQ_MONTHLY = 5 |
const | SEARCHFREQ_QUARTERLY = 6 |
const | SEARCHFREQ_YEARLY = 7 |
Definition at line 19 of file SavedSearch.php.
SavedSearch::DateLastRun | ( | $NewValue = DB_NOVALUE | ) |
Definition at line 289 of file SavedSearch.php.
SavedSearch::Delete | ( | ) |
Delete saved search.
(NOTE: Object is no longer usable after this call!)
Definition at line 857 of file SavedSearch.php.
SavedSearch::Frequency | ( | $NewValue = DB_NOVALUE | ) |
Get/set search frequency.
int | $NewValue | New search frequency value. |
Definition at line 279 of file SavedSearch.php.
Referenced by SavedSearch().
SavedSearch::GetSearchFieldNames | ( | ) |
Get list of fields to be searched.
Definition at line 793 of file SavedSearch.php.
References SearchGroups().
|
static |
Get array of possible search frequency descriptions.
Frequencies may be excluded from list by supplying them as arguments.
Definition at line 828 of file SavedSearch.php.
SavedSearch::GetSearchGroupsAsTextDescription | ( | $IncludeHtml = TRUE , |
|
$StartWithBreak = TRUE , |
|||
$TruncateLongWordsTo = 0 |
|||
) |
Get multi-line string describing search criteria.
bool | $IncludeHtml | Whether to include HTML tags for formatting. (OPTIONAL, defaults to TRUE) |
bool | $StartWithBreak | Whether to start string with BR tag. (OPTIONAL, defaults to TRUE) |
int | $TruncateLongWordsTo | Number of characters to truncate long words to (use 0 for no truncation). (OPTIONAL, defaults to 0) |
Definition at line 614 of file SavedSearch.php.
References SearchGroups().
SavedSearch::GetSearchGroupsAsUrlParameterArray | ( | ) |
Get search groups as an URL parameter array.
Definition at line 439 of file SavedSearch.php.
References SearchGroups().
SavedSearch::GetSearchGroupsAsUrlParameters | ( | ) |
Get search groups as URL parameters (e.g.
something like F2=madison&F4=american+history&G22=17-41).
Definition at line 315 of file SavedSearch.php.
References SearchGroups().
SavedSearch::GetSearchId | ( | ) |
Definition at line 1049 of file SavedSearch.php.
References Id().
SavedSearch::Id | ( | ) |
Get ID of search.
Definition at line 264 of file SavedSearch.php.
Referenced by GetSearchId().
SavedSearch::LastMatches | ( | ) |
Return array of most recently matched ResourceIds for a search.
Definition at line 306 of file SavedSearch.php.
SavedSearch::SavedSearch | ( | $SearchId, | |
$SearchName = NULL , |
|||
$UserId = NULL , |
|||
$Frequency = NULL , |
|||
$SearchGroups = NULL |
|||
) |
Definition at line 34 of file SavedSearch.php.
References Frequency(), SaveLastMatches(), SearchGroups(), SearchName(), and UserId().
SavedSearch::SaveLastMatches | ( | $ArrayofMatchingIds | ) |
Save array of last matches.
array | $ArrayofMatchingIds | for a current search. |
Definition at line 296 of file SavedSearch.php.
Referenced by SavedSearch().
SavedSearch::SearchGroups | ( | $NewSearchGroups = NULL | ) |
Definition at line 118 of file SavedSearch.php.
References SearchEngine\LOGIC_AND, and SearchEngine\LOGIC_OR.
Referenced by GetSearchFieldNames(), GetSearchGroupsAsTextDescription(), GetSearchGroupsAsUrlParameterArray(), GetSearchGroupsAsUrlParameters(), and SavedSearch().
SavedSearch::SearchName | ( | $NewValue = DB_NOVALUE | ) |
Definition at line 257 of file SavedSearch.php.
Referenced by SavedSearch().
|
static |
Extract list of fields to be searched from search group array.
array | $SearchGroups | Search group array. |
Definition at line 803 of file SavedSearch.php.
|
static |
Translate search group array into multi-line string describing search criteria.
array | $SearchGroups | Search group array. |
bool | $IncludeHtml | Whether to include HTML tags for formatting. (OPTIONAL, defaults to TRUE) |
bool | $StartWithBreak | Whether to start string with BR tag. (OPTIONAL, defaults to TRUE) |
int | $TruncateLongWordsTo | Number of characters to truncate long words to (use 0 for no truncation). (OPTIONAL, defaults to 0) |
Definition at line 632 of file SavedSearch.php.
References SearchEngine\LOGIC_AND.
|
static |
Translate a search group array to an URL parameter array.
array | $SearchGroups | Search group array to translate. |
Definition at line 450 of file SavedSearch.php.
References SearchEngine\LOGIC_AND.
|
static |
Translate search group array into URL parameters (e.g.
something like F2=madison&F4=american+history&G22=17-41). A search group array looks something like this:
where "23" and "25" are the field IDs and "Resource Type" and "Audience" are the corresponding field names.
array | $SearchGroups | Search group array. |
Definition at line 357 of file SavedSearch.php.
|
static |
Definition at line 528 of file SavedSearch.php.
References SearchEngine\LOGIC_AND, and SearchEngine\LOGIC_OR.
SavedSearch::UpdateDateLastRun | ( | ) |
Definition at line 283 of file SavedSearch.php.
SavedSearch::UserId | ( | $NewValue = DB_NOVALUE | ) |
Get/set user ID.
int | $NewValue | New user ID value. |
Definition at line 271 of file SavedSearch.php.
Referenced by SavedSearch().
const SavedSearch::SEARCHFREQ_BIWEEKLY = 4 |
Definition at line 28 of file SavedSearch.php.
Referenced by SavedSearchFactory\GetSearchesDueToRun().
const SavedSearch::SEARCHFREQ_DAILY = 2 |
Definition at line 26 of file SavedSearch.php.
Referenced by SavedSearchFactory\GetSearchesDueToRun().
const SavedSearch::SEARCHFREQ_HOURLY = 1 |
Definition at line 25 of file SavedSearch.php.
Referenced by SavedSearchFactory\GetSearchesDueToRun().
const SavedSearch::SEARCHFREQ_MONTHLY = 5 |
Definition at line 29 of file SavedSearch.php.
Referenced by SavedSearchFactory\GetSearchesDueToRun().
const SavedSearch::SEARCHFREQ_NEVER = 0 |
Definition at line 24 of file SavedSearch.php.
const SavedSearch::SEARCHFREQ_QUARTERLY = 6 |
Definition at line 30 of file SavedSearch.php.
Referenced by SavedSearchFactory\GetSearchesDueToRun().
const SavedSearch::SEARCHFREQ_WEEKLY = 3 |
Definition at line 27 of file SavedSearch.php.
Referenced by SavedSearchFactory\GetSearchesDueToRun().
const SavedSearch::SEARCHFREQ_YEARLY = 7 |
Definition at line 31 of file SavedSearch.php.
Referenced by SavedSearchFactory\GetSearchesDueToRun().