Class FOFModelFieldNumber

Description

FrameworkOnFramework model behavior class

  • since: 2.1

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

FOFModelField
   |
   --FOFModelFieldNumber
Direct descendents
Class Description
 class FOFModelFieldBoolean FrameworkOnFramework model behavior class
Method Summary
 string between (mixed $from, mixed $to, [boolean $include = true])
 string interval (integer|float $value, integer|float $interval, [boolean $include = true])
 string outside (mixed $from, mixed $to, [boolean $include = false])
 string partial (mixed $value)
Variables
Methods
between (line 44)

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:
FOFModelField::between()
Perform a between limits match (usually: search for a value between
interval (line 108)

Perform an interval match. It's similar to a 'between' match, but the from and to values are calculated based on $value and $interval: $value - $interval < VALUE < $value + $interval

  • return: The SQL where clause
  • access: public
string interval (integer|float $value, integer|float $interval, [boolean $include = true])
  • integer|float $value: The center value of the search space
  • integer|float $interval: The width of the search space
  • boolean $include: Should I include the boundaries in the search?

Redefinition of:
FOFModelField::interval()
Perform an interval search (usually: a date interval check)
outside (line 77)

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:
FOFModelField::outside()
Perform an outside limits match (usually: search for a value outside an
partial (line 26)

The partial match is mapped to an exact match

  • return: The SQL where clause for this search
  • access: public
string partial (mixed $value)
  • mixed $value: The value to compare to

Redefinition of:
FOFModelField::partial()
Perform a partial match (usually: search in string)

Inherited Methods

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 15:09:40 +0100 by phpDocumentor 1.4.3