Class FOFModelFieldDate

Description

FrameworkOnFramework model behavior class

  • since: 2.1

Located in /libraries/fof/model/field/date.php (line 17)

FOFModelField
   |
   --FOFModelFieldText
      |
      --FOFModelFieldDate
Method Summary
 string between (mixed $from, mixed $to, [boolean $include = true])
 array getInterval (string|array|object $interval)
 string interval (string $value, string|array|object $interval, [boolean $include = true])
 string outside (mixed $from, mixed $to, [boolean $include = false])
Variables
Methods
between (line 42)

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

  • return: The SQL where clause for this search
  • access: public
string between (mixed $from, mixed $to, [boolean $include = true])
  • 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?

Redefinition of:
FOFModelFieldText::between()
Dummy method; this search makes no sense for text fields
getDefaultSearchMethod (line 24)

Returns the default search method for this field.

  • access: public
string getDefaultSearchMethod ()

Redefinition of:
FOFModelFieldText::getDefaultSearchMethod()
Returns the default search method for this field.
getInterval (line 143)

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.

  • return: The parsed, hash array form of the interval
  • access: protected
array getInterval (string|array|object $interval)
  • string|array|object $interval: The interval expression to parse
interval (line 104)

Interval date search

  • return: the sql string
  • access: public
string interval (string $value, string|array|object $interval, [boolean $include = true])
  • string $value: The value to search
  • string|array|object $interval: The interval. Can be (+1 MONTH or array('value' => 1, 'unit' => 'MONTH', 'sign' => '+'))
  • boolean $include: If the borders should be included

Redefinition of:
FOFModelFieldText::interval()
Dummy method; this search makes no sense for text fields
outside (line 75)

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)

  • return: The SQL where clause for this search
  • access: public
string outside (mixed $from, mixed $to, [boolean $include = false])
  • 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?

Redefinition of:
FOFModelFieldText::outside()
Dummy method; this search makes no sense for text fields

Inherited Methods

Inherited From FOFModelFieldText

 FOFModelFieldText::__construct()
 FOFModelFieldText::between()
 FOFModelFieldText::exact()
 FOFModelFieldText::getDefaultSearchMethod()
 FOFModelFieldText::interval()
 FOFModelFieldText::outside()
 FOFModelFieldText::partial()

Inherited From FOFModelField

 FOFModelField::__construct()
 FOFModelField::between()
 FOFModelField::exact()
 FOFModelField::getDefaultSearchMethod()
 FOFModelField::getField()
 FOFModelField::getFieldName()
 FOFModelField::getFieldType()
 FOFModelField::getSearchMethods()
 FOFModelField::interval()
 FOFModelField::isEmpty()
 FOFModelField::outside()
 FOFModelField::partial()
 FOFModelField::search()

Documentation generated on Tue, 19 Nov 2013 14:57:56 +0100 by phpDocumentor 1.4.3