|
| __construct ($db, $field, $table_alias=false) |
|
| isEmpty ($value) |
|
| getDefaultSearchMethod () |
|
| getSearchMethods () |
|
| exact ($value) |
|
| partial ($value) |
|
| between ($from, $to, $include=true) |
|
| outside ($from, $to, $include=false) |
|
| interval ($from, $interval) |
|
| range ($from, $to, $include=true) |
|
| modulo ($from, $interval, $include=true) |
|
| search ($value, $operator='=') |
|
| getFieldName () |
|
◆ __construct()
__construct |
( |
|
$db, |
|
|
|
$field, |
|
|
|
$table_alias = false |
|
) |
| |
Constructor
- Paramètres
-
FOFDatabaseDriver | $db | The database object |
object | $field | The field informations as taken from the db |
string | $table_alias | The table alias to use when filtering |
Références $db, $field, et name.
◆ between()
between |
( |
|
$from, |
|
|
|
$to, |
|
|
|
$include = true |
|
) |
| |
|
abstract |
Perform a between limits match (usually: search for a value between two numbers or a date between two preset dates). When $include is true the condition tested is: $from <= VALUE <= $to When $include is false the condition tested is: $from < VALUE < $to
- Paramètres
-
mixed | $from | The lowest value to compare to |
mixed | $to | The higherst value to compare to |
boolean | $include | Should we include the boundaries in the search? |
- Renvoie
- string The SQL where clause for this search
◆ exact()
Perform an exact match (equality matching)
- Paramètres
-
mixed | $value | The value to compare to |
- Renvoie
- string The SQL where clause for this search
Références $db, $value, et FOFPlatform\getInstance().
◆ getDefaultSearchMethod()
getDefaultSearchMethod |
( |
| ) |
|
Returns the default search method for a field. This always returns 'exact' and you are supposed to override it in specialised classes. The possible values are exact, partial, between and outside, unless something different is returned by getSearchMethods().
- Voir également
- self::getSearchMethods()
- Renvoie
- string
◆ getField()
static getField |
( |
|
$field, |
|
|
|
$config = array() |
|
) |
| |
|
static |
◆ getFieldName()
Get the field name with the given table alias
- Renvoie
- string The field name
Références $name, et name.
◆ getFieldType()
static getFieldType |
( |
|
$type | ) |
|
|
static |
Get the classname based on the field Type
- Paramètres
-
string | $type | The type of the field |
- Renvoie
- string the class suffix
Références $type.
◆ getSearchMethods()
Return the search methods available for this field class,
- Renvoie
- array
Références $class, et $tmp.
◆ interval()
interval |
( |
|
$from, |
|
|
|
$interval |
|
) |
| |
|
abstract |
Perform an interval search (usually: a date interval check)
- Paramètres
-
string | $from | The value to search |
string | array | object | $interval | The interval |
- Renvoie
- string The SQL where clause for this search
◆ isEmpty()
Is it a null or otherwise empty value?
- Paramètres
-
mixed | $value | The value to test for emptiness |
- Renvoie
- boolean
Références $value.
◆ modulo()
modulo |
( |
|
$from, |
|
|
|
$interval, |
|
|
|
$include = true |
|
) |
| |
|
abstract |
Perform an modulo search
- Paramètres
-
integer | float | $value | The starting value of the search space |
integer | float | $interval | The interval period of the search space |
boolean | $include | Should I include the boundaries in the search? |
- Renvoie
- string The SQL where clause
◆ outside()
outside |
( |
|
$from, |
|
|
|
$to, |
|
|
|
$include = false |
|
) |
| |
|
abstract |
Perform an outside limits match (usually: search for a value outside an area or a date outside a preset period). When $include is true the condition tested is: (VALUE <= $from) || (VALUE >= $to) When $include is false the condition tested is: (VALUE < $from) || (VALUE > $to)
- Paramètres
-
mixed | $from | The lowest value of the excluded range |
mixed | $to | The higherst value of the excluded range |
boolean | $include | Should we include the boundaries in the search? |
- Renvoie
- string The SQL where clause for this search
◆ partial()
Perform a partial match (usually: search in string)
- Paramètres
-
mixed | $value | The value to compare to |
- Renvoie
- string The SQL where clause for this search
◆ range()
range |
( |
|
$from, |
|
|
|
$to, |
|
|
|
$include = true |
|
) |
| |
|
abstract |
Perform a between limits match (usually: search for a value between two numbers or a date between two preset dates). When $include is true the condition tested is: $from <= VALUE <= $to When $include is false the condition tested is: $from < VALUE < $to
- Paramètres
-
mixed | $from | The lowest value to compare to |
mixed | $to | The higherst value to compare to |
boolean | $include | Should we include the boundaries in the search? |
- Renvoie
- string The SQL where clause for this search
◆ search()
search |
( |
|
$value, |
|
|
|
$operator = '=' |
|
) |
| |
Return the SQL where clause for a search
- Paramètres
-
mixed | $value | The value to search for |
string | $operator | The operator to use |
- Renvoie
- string The SQL where clause for this search
Références $value.
◆ $_db
◆ $name
◆ $null_value
◆ $table_alias
◆ $type
La documentation de cette classe a été générée à partir du fichier suivant :