DBFilter Class Reference
[Model]
A filter to apply to a search result. More...
Inheritance diagram for DBFilter:
Public Member Functions |
|
__construct ($title, $key= '') | |
contructor |
|
apply ($query) | |
Do what should be done. |
|
get_key () | |
get_title () | |
is_default () | |
set_is_default ($bool) | |
set_key ($key) | |
set_title ($title) | |
Protected Member Functions |
|
preprocess_value ($value, $operator) | |
Preporocess value depending on operator.
|
Detailed Description
A filter to apply to a search result.
Definition at line 8 of file dbfilter.cls.php.
Constructor & Destructor Documentation
DBFilter::__construct | ( | $ | title, | |
$ | key = '' |
|||
) |
Member Function Documentation
DBFilter::apply | ( | $ | query | ) |
Do what should be done.
- Parameters:
-
DataObjectBase The current query to be modified
Implements IDBQueryModifier.
Reimplemented in DBFilterColumn.
Definition at line 48 of file dbfilter.cls.php.
DBFilter::get_key | ( | ) |
Definition at line 40 of file dbfilter.cls.php.
DBFilter::get_title | ( | ) |
Definition at line 32 of file dbfilter.cls.php.
DBFilter::is_default | ( | ) |
Definition at line 52 of file dbfilter.cls.php.
00052 { 00053 return $this->is_default; 00054 }
DBFilter::preprocess_value | ( | $ | value, | |
$ | operator | |||
) | [protected] |
Preporocess value depending on operator.
- Since:
- 0.5.1
- Parameters:
-
string $value string $operator
- Returns:
- string
Definition at line 69 of file dbfilter.cls.php.
00069 { 00070 $ret = $value; 00071 switch ($operator) { 00072 case DBWhere::OP_LIKE: 00073 if ($value !== '') { 00074 $ret = '%' . $value . '%'; 00075 } 00076 break; 00077 } 00078 return $ret; 00079 }
DBFilter::set_is_default | ( | $ | bool | ) |
Definition at line 56 of file dbfilter.cls.php.
00056 { 00057 $this->is_default = $bool; 00058 }
DBFilter::set_key | ( | $ | key | ) |
Definition at line 44 of file dbfilter.cls.php.
DBFilter::set_title | ( | $ | title | ) |
Definition at line 36 of file dbfilter.cls.php.
The documentation for this class was generated from the following file:
- gyro/core/model/base/dbfilter.cls.php