![]() |
IP.Board
3.3.0
|
Public Member Functions | |
| __construct (ipsRegistry $registry) | |
| __construct (ipsRegistry $registry) | |
| formatSearchTerm ($search_term) | |
| formatSearchTerm ($search_term) | |
| isBoolean () | |
| isBoolean () | |
| logSphinxWarnings () | |
| remapColumn ($column) | |
| remapColumn ($column) | |
| search () | |
| search () | |
| setCondition ($column, $operator, $value, $comp='AND') | |
| setCondition ($column, $operator, $value, $comp='AND') | |
| setDateRange ($begin, $end=0) | |
| setDateRange ($begin, $end=0) | |
| setMultiConditions ($conditions, $inner_comp='OR', $outer_comp='AND') | |
| setMultiConditions ($conditions, $inner_comp='OR', $outer_comp='AND') | |
| viewNewContent () | |
| viewNewContent () | |
| viewUserContent ($member) | |
| viewUserContent ($member) | |
Data Fields | |
| $sphinxClient | |
Protected Attributes | |
| $search_begin_timestamp = 0 | |
| $search_end_timestamp = 0 | |
| $whereConditions = array() | |
| __construct | ( | ipsRegistry $ | registry | ) |
Setup registry objects
public
| object | ipsRegistry $registry |
Reimplemented in search_engine_ccs, search_engine_calendar, search_engine_core, search_engine_blog, search_engine_downloads, search_engine_blog, search_engine_forums, search_engine_members, and search_engine_gallery.
| __construct | ( | ipsRegistry $ | registry | ) |
Setup registry objects
public
| object | ipsRegistry $registry |
Reimplemented in search_engine_ccs, search_engine_calendar, search_engine_core, search_engine_blog, search_engine_downloads, search_engine_blog, search_engine_forums, search_engine_members, and search_engine_gallery.
| formatSearchTerm | ( | $ | search_term | ) |
Formats search term for SQL
private
| string | Raw IPB santized form input |
| formatSearchTerm | ( | $ | search_term | ) |
Formats search term for SQL
private
| string | Raw IPB santized form input |
| isBoolean | ( | ) |
Can handle boolean searching
public
Reimplemented in search_engine_ccs, search_engine_gallery, search_engine_downloads, search_engine_members, search_engine_calendar, and search_engine_core.
| isBoolean | ( | ) |
Can handle boolean searching
public
Reimplemented in search_engine_ccs, search_engine_gallery, search_engine_downloads, search_engine_members, search_engine_calendar, and search_engine_core.
Checks and logs any errors
public
| remapColumn | ( | $ | column | ) |
Remap standard columns (Apps can override )
public
| string | $column | sql table column for this condition |
Reimplemented in search_engine_forums, search_engine_ccs, search_engine_gallery, search_engine_blog, search_engine_downloads, search_engine_downloads, search_engine_blog, search_engine_members, search_engine_calendar, search_engine_core, and search_engine_nexus.
| remapColumn | ( | $ | column | ) |
Remap standard columns (Apps can override )
public
| string | $column | sql table column for this condition |
Reimplemented in search_engine_forums, search_engine_ccs, search_engine_gallery, search_engine_blog, search_engine_downloads, search_engine_downloads, search_engine_blog, search_engine_members, search_engine_calendar, search_engine_core, and search_engine_nexus.
| search | ( | ) |
Perform a search. Returns an array of a total count (total number of matches) and an array of IDs matching the required number based on pagination. The ids returned would be based on the filters and type of search
So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25
public
Reimplemented in search_engine_forums, search_engine_ccs, search_engine_downloads, search_engine_gallery, search_engine_blog, search_engine_blog, search_engine_calendar, search_engine_core, search_engine_downloads, search_engine_members, and search_engine_nexus.
| search | ( | ) |
Perform a search. Returns an array of a total count (total number of matches) and an array of IDs matching the required number based on pagination. The ids returned would be based on the filters and type of search
So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25
public
Reimplemented in search_engine_forums, search_engine_ccs, search_engine_downloads, search_engine_gallery, search_engine_blog, search_engine_blog, search_engine_calendar, search_engine_core, search_engine_downloads, search_engine_members, and search_engine_nexus.
| setCondition | ( | $ | column, |
| $ | operator, | ||
| $ | value, | ||
| $ | comp = 'AND' |
||
| ) |
mySQL function for adding special search conditions
public
| string | $column | sql table column for this condition |
| string | $operator | Operation to perform for this condition, ex: =, <>, IN, NOT IN |
| mixed | $value | Value to check with |
| string | $comp | Comparison type |
| setCondition | ( | $ | column, |
| $ | operator, | ||
| $ | value, | ||
| $ | comp = 'AND' |
||
| ) |
mySQL function for adding special search conditions
public
| string | $column | sql table column for this condition |
| string | $operator | Operation to perform for this condition, ex: =, <>, IN, NOT IN |
| mixed | $value | Value to check with |
| string | $comp | Comparison type |
| setDateRange | ( | $ | begin, |
| $ | end = 0 |
||
| ) |
Restrict the date range that the search is performed on
public
| int | $begin | Start timestamp |
| int | [$end] End timestamp |
| setDateRange | ( | $ | begin, |
| $ | end = 0 |
||
| ) |
Restrict the date range that the search is performed on
public
| int | $begin | Start timestamp |
| int | [$end] End timestamp |
| setMultiConditions | ( | $ | conditions, |
| $ | inner_comp = 'OR', |
||
| $ | outer_comp = 'AND' |
||
| ) |
Allows you to specify multiple conditions that are chained together
public
| array | $conditions | Array of conditions, each element has 3 keys: column, operator, value, see the setCondition function for information on each |
| string | $inner_comp | Comparison operator to use inside the chain |
| string | $outer_comp | Comparison operator to use outside the chain |
| setMultiConditions | ( | $ | conditions, |
| $ | inner_comp = 'OR', |
||
| $ | outer_comp = 'AND' |
||
| ) |
Allows you to specify multiple conditions that are chained together
public
| array | $conditions | Array of conditions, each element has 3 keys: column, operator, value, see the setCondition function for information on each |
| string | $inner_comp | Comparison operator to use inside the chain |
| string | $outer_comp | Comparison operator to use outside the chain |
| viewNewContent | ( | ) |
Perform the viewNewContent search Generic version Populates $this->_count and $this->_results
public
Reimplemented in search_engine_ccs, search_engine_forums, search_engine_downloads, search_engine_blog, search_engine_gallery, search_engine_blog, search_engine_downloads, search_engine_members, and search_engine_calendar.
| viewNewContent | ( | ) |
Perform the viewNewContent search Generic version Populates $this->_count and $this->_results
public
Reimplemented in search_engine_ccs, search_engine_forums, search_engine_downloads, search_engine_blog, search_engine_gallery, search_engine_blog, search_engine_downloads, search_engine_members, and search_engine_calendar.
| viewUserContent | ( | $ | member | ) |
Perform the search Populates $this->_count and $this->_results
public
Reimplemented in search_engine_ccs, search_engine_blog, search_engine_gallery, search_engine_blog, search_engine_downloads, search_engine_downloads, search_engine_forums, and search_engine_calendar.
| viewUserContent | ( | $ | member | ) |
Perform the search Populates $this->_count and $this->_results
public
Reimplemented in search_engine_ccs, search_engine_blog, search_engine_gallery, search_engine_blog, search_engine_downloads, search_engine_downloads, search_engine_forums, and search_engine_calendar.