Search
in package
Shows the search form.
Tags
Table of Contents
Properties
- $compressed_params : string
- $current_label_id : int
- $folder : string
- $max_members_to_search : int
- $params : array<string|int, mixed>
- $per_page : int
- $sort_columns : array<string|int, mixed>
- $start : int
- $to_mark : array<string|int, mixed>
- $label_join : string
- $label_query : string
- $search_query : string
- $searchq_parameters : array<string|int, mixed>
- $time_query : string
- $user_query : string
Methods
- __construct() : mixed
- Constructor.
- performSearch() : void
- Actually does the search of personal messages, and shows the results.
- showForm() : void
- Allows searching through personal messages.
- compressParams() : string
- Combine the parameters together for pagination and the like.
- setContextualParams() : void
- Keep a record of the search params so the user can edit them.
- setLabelQuery() : void
- Sort out any labels we may be searching by.
- setParams() : void
- Sets all the values in $this->params.
- setSearchQuery() : void
- Sets the value of $this->search_query.
- setTimeQuery() : void
- Age limits?
- setUserQuery() : void
- Sets the value of $this->user_query.
Properties
$compressed_params
public
string
$compressed_params
= ''
String representation of $this->params.
$current_label_id
public
int
$current_label_id
= -1
ID number of the current label, or -1 for the main inbox folder.
$folder
public
string
$folder
= 'inbox'
The folder being viewed. Either 'inbox' or 'sent'.
$max_members_to_search
public
int
$max_members_to_search
= 500
Maximum number of members to search.
$params
public
array<string|int, mixed>
$params
= []
The user-specified search parameters.
$per_page
public
int
$per_page
= 30
Maximum number of results to list per page.
$sort_columns
public
array<string|int, mixed>
$sort_columns
= ['pm.id_pm']
Sorting options.
Tags
$start
public
int
$start
= 0
Offset value for pagination purposes.
$to_mark
public
static array<string|int, mixed>
$to_mark
= []
Words to highlight in search results. This is static for the sake of easy access by SearchResult.
$label_join
protected
string
$label_join
= ''
SQL query fragment to join tables for filtering the search by label.
$label_query
protected
string
$label_query
= ''
SQL query fragment to filter the search by label.
$search_query
protected
string
$search_query
= ''
SQL query fragment to search for the requested content.
$searchq_parameters
protected
array<string|int, mixed>
$searchq_parameters
= []
Collection of runtime parameters for performing the search.
$time_query
protected
string
$time_query
= ''
SQL query fragment to filter the search by time.
$user_query
protected
string
$user_query
= ''
SQL query fragment to filter the search by member.
Methods
__construct()
Constructor.
public
__construct(bool $inbox) : mixed
Parameters
- $inbox : bool
-
Whether we are searching the inbox or sent items. This param currently does nothing.
performSearch()
Actually does the search of personal messages, and shows the results.
public
performSearch() : void
showForm()
Allows searching through personal messages.
public
showForm() : void
compressParams()
Combine the parameters together for pagination and the like.
protected
compressParams() : string
..
Tags
Return values
stringsetContextualParams()
Keep a record of the search params so the user can edit them.
protected
setContextualParams() : void
setLabelQuery()
Sort out any labels we may be searching by.
protected
setLabelQuery() : void
setParams()
Sets all the values in $this->params.
protected
setParams() : void
... Well, almost all of them. In particular, $this->params['search'] is slightly different for showForm() vs. performSearch(), so those methods each set that parameter value themselves.
setSearchQuery()
Sets the value of $this->search_query.
protected
setSearchQuery() : void
Also sets self::$to_mark.
setTimeQuery()
Age limits?
protected
setTimeQuery() : void
setUserQuery()
Sets the value of $this->user_query.
protected
setUserQuery() : void