![]() |
Framework
3.9
|
The SearchParameters class interprets the set of input parameters for a search and generates the corresponding SQL constraints to perform the search against the database. More...
Public Member Functions | |
| __sleep () | |
| copy ($src) | |
| SearchParameters ($target, $form=null) | |
| get ($field, $mode=null) | |
| setHandler ($field, $handler) | |
| Override default handling by setting a custom callback to generate the constraint for a field. More... | |
| fromArray ($array) | |
| setParam ($fieldname, $mode, $value) | |
| clearParam ($field) | |
| Clear any parameters set for the specified field. More... | |
| set ($field, $mode, $value) | |
| fromGET () | |
| fromPOST () | |
| remapField ($old, $new) | |
| copyField ($old, $new) | |
| secondaryFields ($src) | |
| Specifies additional data fields to search when querying for the given source field. More... | |
| toQueryString () | |
| generateConstraint ($first=true, $firstText="WHERE") | |
| generateConstraint More... | |
| getClause ($handler, $modifier, $field, $value) | |
| _getClause ($handler, $modifier, $field, $value) | |
Static Public Member Functions | |
| static | joinClauses (&$first, $clause, $joinWith="AND", $firstText) |
| joinClauses More... | |
| static | closeClause (&$constraint, $firstText) |
Public Attributes | |
| $form | |
| $target | |
| $params | |
| $handlers | |
| $joinWith = "AND" | |
| $paramHandlers = array() | |
| $secondaryFields = array() | |
| $additional = array() | |
| $empty = true | |
| true if no search parameters were specified, false if any parameter was found More... | |
The SearchParameters class interprets the set of input parameters for a search and generates the corresponding SQL constraints to perform the search against the database.
Definition at line 556 of file search_form.inc.
| SearchParameters::__sleep | ( | ) |
Definition at line 569 of file search_form.inc.
| SearchParameters::_getClause | ( | $handler, | |
| $modifier, | |||
| $field, | |||
| $value | |||
| ) |
Definition at line 894 of file search_form.inc.
| SearchParameters::clearParam | ( | $field | ) |
Clear any parameters set for the specified field.
| string | $field | the name of the field |
Definition at line 733 of file search_form.inc.
|
static |
Definition at line 1001 of file search_form.inc.
| SearchParameters::copy | ( | $src | ) |
Definition at line 574 of file search_form.inc.
| SearchParameters::copyField | ( | $old, | |
| $new | |||
| ) |
Definition at line 770 of file search_form.inc.
| SearchParameters::fromArray | ( | $array | ) |
Definition at line 649 of file search_form.inc.
| SearchParameters::fromGET | ( | ) |
Definition at line 747 of file search_form.inc.
| SearchParameters::fromPOST | ( | ) |
Definition at line 752 of file search_form.inc.
| SearchParameters::generateConstraint | ( | $first = true, |
|
$firstText = "WHERE" |
|||
| ) |
generateConstraint
@first: whether this set of clauses is the first in a group
@firstText: the text is this is the first clause: either WHERE or AND (
Definition at line 820 of file search_form.inc.
| SearchParameters::get | ( | $field, | |
$mode = null |
|||
| ) |
Definition at line 601 of file search_form.inc.
| SearchParameters::getClause | ( | $handler, | |
| $modifier, | |||
| $field, | |||
| $value | |||
| ) |
Definition at line 871 of file search_form.inc.
|
static |
joinClauses
@first: whether this is the first clause; if so start with "WHERE"
@clause: the statement, e.g., l_name like 'smith'
@joinWith: specify is statement is to be joined with OR or AND
@firstText: the text to output if first: WHERE or "" - clause may be first in a group "(" rather than first of all clauses.
Definition at line 983 of file search_form.inc.
| SearchParameters::remapField | ( | $old, | |
| $new | |||
| ) |
Definition at line 757 of file search_form.inc.
| SearchParameters::SearchParameters | ( | $target, | |
$form = null |
|||
| ) |
Definition at line 583 of file search_form.inc.
| SearchParameters::secondaryFields | ( | $src | ) |
Specifies additional data fields to search when querying for the given source field.
| string | $src | name of the primary field |
| [string] | the list of additional fields to search |
Definition at line 781 of file search_form.inc.
| SearchParameters::set | ( | $field, | |
| $mode, | |||
| $value | |||
| ) |
Definition at line 742 of file search_form.inc.
| SearchParameters::setHandler | ( | $field, | |
| $handler | |||
| ) |
Override default handling by setting a custom callback to generate the constraint for a field.
| $field | - the field name in the obj to be queried |
@handler - callback function such as array(MyClass, MyFunction)
When the function is called, it is given the parameters $name and $value
Definition at line 640 of file search_form.inc.
| SearchParameters::setParam | ( | $fieldname, | |
| $mode, | |||
| $value | |||
| ) |
Definition at line 689 of file search_form.inc.
| SearchParameters::toQueryString | ( | ) |
Definition at line 794 of file search_form.inc.
| SearchParameters::$additional = array() |
Definition at line 565 of file search_form.inc.
| SearchParameters::$empty = true |
true if no search parameters were specified, false if any parameter was found
Definition at line 566 of file search_form.inc.
| SearchParameters::$form |
Definition at line 558 of file search_form.inc.
| SearchParameters::$handlers |
Definition at line 561 of file search_form.inc.
| SearchParameters::$joinWith = "AND" |
Definition at line 562 of file search_form.inc.
| SearchParameters::$paramHandlers = array() |
Definition at line 563 of file search_form.inc.
| SearchParameters::$params |
Definition at line 560 of file search_form.inc.
| SearchParameters::$secondaryFields = array() |
Definition at line 564 of file search_form.inc.
| SearchParameters::$target |
Definition at line 559 of file search_form.inc.