PHP Класс FOF30\Model\DataModel\Filter\Date

Наследование: extends Text
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
between ( mixed $from, mixed $to, boolean $include = true ) : string Perform a between limits match. When $include is true the condition tested is: $from <= VALUE <= $to When $include is false the condition tested is: $from < VALUE < $to
getDefaultSearchMethod ( ) : string Returns the default search method for this field.
interval ( string $value, string | array | object $interval, boolean $include = true ) : string Interval date search
outside ( mixed $from, mixed $to, boolean $include = false ) : string Perform an outside limits match. When $include is true the condition tested is: (VALUE <= $from) || (VALUE >= $to) When $include is false the condition tested is: (VALUE < $from) || (VALUE > $to)
range ( mixed $from, mixed $to, boolean $include = true ) : string Perform a between limits match. When $include is true the condition tested is: $from <= VALUE <= $to When $include is false the condition tested is: $from < VALUE < $to

Защищенные методы

Метод Описание
getInterval ( string | array | object $interval ) : array Parses an interval –which may be given as a string, array or object– into a standardised hash array that can then be used bu the interval() method.

Описание методов

between() публичный Метод

Perform a between limits match. When $include is true the condition tested is: $from <= VALUE <= $to When $include is false the condition tested is: $from < VALUE < $to
public between ( mixed $from, mixed $to, boolean $include = true ) : string
$from mixed The lowest value to compare to
$to mixed The higherst value to compare to
$include boolean Should we include the boundaries in the search?
Результат string The SQL where clause for this search

getDefaultSearchMethod() публичный Метод

Returns the default search method for this field.
public getDefaultSearchMethod ( ) : string
Результат string

getInterval() защищенный Метод

Parses an interval –which may be given as a string, array or object– into a standardised hash array that can then be used bu the interval() method.
protected getInterval ( string | array | object $interval ) : array
$interval string | array | object The interval expression to parse
Результат array The parsed, hash array form of the interval

interval() публичный Метод

Interval date search
public interval ( string $value, string | array | object $interval, boolean $include = true ) : string
$value string The value to search
$interval string | array | object The interval. Can be (+1 MONTH or array('value' => 1, 'unit' => 'MONTH', 'sign' => '+'))
$include boolean If the borders should be included
Результат string the sql string

outside() публичный Метод

Perform an outside limits match. When $include is true the condition tested is: (VALUE <= $from) || (VALUE >= $to) When $include is false the condition tested is: (VALUE < $from) || (VALUE > $to)
public outside ( mixed $from, mixed $to, boolean $include = false ) : string
$from mixed The lowest value of the excluded range
$to mixed The higherst value of the excluded range
$include boolean Should we include the boundaries in the search?
Результат string The SQL where clause for this search

range() публичный Метод

Perform a between limits match. When $include is true the condition tested is: $from <= VALUE <= $to When $include is false the condition tested is: $from < VALUE < $to
public range ( mixed $from, mixed $to, boolean $include = true ) : string
$from mixed The lowest value to compare to
$to mixed The higherst value to compare to
$include boolean Should we include the boundaries in the search?
Результат string The SQL where clause for this search