Class FOFModelFieldDate
FrameworkOnFramework model behavior class
-
FOFModelField
-
FOFModelFieldText
-
FOFModelFieldDate
Methods summary
public
string
|
#
getDefaultSearchMethod( )
Returns the default search method for this field.
Returns the default search method for this field.
Returns
string
Overrides
|
public
string
|
#
between( mixed $from, mixed $to, boolean $include = true )
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
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
Parameters
- $from
mixed - $from The lowest value to compare to
- $to
mixed - $to The higherst value to compare to
- $include
boolean - $include Should we include the boundaries in the search?
Returns
string - The SQL where clause for this search
Overrides
|
public
string
|
#
outside( mixed $from, mixed $to, boolean $include = false )
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)
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)
Parameters
- $from
mixed - $from The lowest value of the excluded range
- $to
mixed - $to The higherst value of the excluded range
- $include
boolean - $include Should we include the boundaries in the search?
Returns
string - The SQL where clause for this search
Overrides
|
public
string
|
#
interval( string $value, string|array|object $interval, boolean $include = true )
Interval date search
Parameters
- $value
string - $value The value to search
- $interval
string|array|object - $interval The interval. Can be (+1 MONTH or array('value' => 1, 'unit' =>
'MONTH', 'sign' => '+'))
- $include
boolean - $include If the borders should be included
Returns
string - the sql string
Overrides
|
public
string
|
#
range( mixed $from, mixed $to, boolean $include = true )
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
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
Parameters
- $from
mixed - $from The lowest value to compare to
- $to
mixed - $to The higherst value to compare to
- $include
boolean - $include Should we include the boundaries in the search?
Returns
string - The SQL where clause for this search
Overrides
|
protected
array
|
#
getInterval( string|array|object $interval )
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.
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.
Parameters
- $interval
string|array|object - $interval The interval expression to parse
Returns
array - The parsed, hash array form of the interval
|
__construct(),
exact(),
modulo(),
partial()
getField(),
getFieldName(),
getFieldType(),
getSearchMethods(),
isEmpty(),
search()
Magic methods summary
Properties summary
$_db,
$name,
$null_value,
$table_alias,
$type