Abstract Class FOFModelField

Description

FrameworkOnFramework model behavior class

  • abstract:
  • since: 2.1

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


	
			
Direct descendents
Class Description
 class FOFModelFieldNumber FrameworkOnFramework model behavior class
 class FOFModelFieldText FrameworkOnFramework model behavior class
Variable Summary
 string $name
 mixed $null_value
 string $table_alias
 string $type
 mixed $_db
Method Summary
 static FOFModelField getField (object $field, [array $config = array()])
 static string getFieldType (string $type)
 FOFModelField __construct (JDatabaseDriver $db, object $field, [string $table_alias = false])
 string between (mixed $from, mixed $to, [boolean $include = true])
 string exact (mixed $value)
 string getFieldName ()
 array getSearchMethods ()
 string interval (string $from, string|array|object $interval)
 boolean isEmpty (mixed $value)
 string outside (mixed $from, mixed $to, [boolean $include = false])
 string partial (mixed $value)
 string search (mixed $value, [string $operator = '='])
Variables
string $name = '' (line 27)

The column name of the table field

  • access: protected
mixed $null_value = null (line 48)

The null value for this type

  • access: public
string $table_alias = false (line 41)

The alias of the table used for filtering

  • access: protected
string $type = '' (line 34)

The column type of the table field

  • access: protected
mixed $_db = null (line 20)
  • access: protected
Methods
static getField (line 243)

Creates a field Object based on the field column type

  • return: The Field object
  • access: public
static FOFModelField getField (object $field, [array $config = array()])
  • object $field: The field informations
  • array $config: The field configuration (like the db object to use)
static getFieldType (line 286)

Get the classname based on the field Type

  • return: the class suffix
  • access: public
static string getFieldType (string $type)
  • string $type: The type of the field
Constructor __construct (line 57)

Constructor

  • access: public
FOFModelField __construct (JDatabaseDriver $db, object $field, [string $table_alias = false])
  • JDatabaseDriver $db: The database object
  • object $field: The field informations as taken from the db
  • string $table_alias: The table alias to use when filtering

Redefined in descendants as:
between (line 172)

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

  • return: The SQL where clause for this search
  • abstract:
  • 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?

Redefined in descendants as:
exact (line 129)

Perform an exact match (equality matching)

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

Redefined in descendants as:
getDefaultSearchMethod (line 88)

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().

  • see: self::getSearchMethods()
  • access: public
string getDefaultSearchMethod ()

Redefined in descendants as:
getFieldName (line 223)

Get the field name with the given table alias

  • return: The field name
  • access: public
string getFieldName ()
getSearchMethods (line 98)

Return the search methods available for this field class,

  • access: public
array getSearchMethods ()
interval (line 198)

Perform an interval search (usually: a date interval check)

  • return: The SQL where clause for this search
  • abstract:
  • access: public
string interval (string $from, string|array|object $interval)
  • string $from: The value to search
  • string|array|object $interval: The interval

Redefined in descendants as:
isEmpty (line 73)

Is it a null or otherwise empty value?

  • access: public
boolean isEmpty (mixed $value)
  • mixed $value: The value to test for emptiness

Redefined in descendants as:
outside (line 188)

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)

  • return: The SQL where clause for this search
  • abstract:
  • 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?

Redefined in descendants as:
partial (line 156)

Perform a partial match (usually: search in string)

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

Redefined in descendants as:
search (line 208)

Return the SQL where clause for a search

  • return: The SQL where clause for this search
  • access: public
string search (mixed $value, [string $operator = '='])
  • mixed $value: The value to search for
  • string $operator: The operator to use

Documentation generated on Tue, 19 Nov 2013 15:02:59 +0100 by phpDocumentor 1.4.3