\FOFModelField
FrameworkOnFramework model behavior class
Synopsis
class FOFModelField
{
- // members
- protected $_db;
- protected $name;
- protected $type;
- protected $table_alias;
- public $null_value;
- // methods
- public void __construct()
- public boolean isEmpty()
- public string getDefaultSearchMethod()
- public array getSearchMethods()
- public string exact()
- public abstract string partial()
- public abstract string between()
- public abstract string outside()
- public abstract string interval()
- public string search()
- public string getFieldName()
- public static FOFModelField getField()
- public static string getFieldType()
Hierarchy
Members
protected
- $_db
- $name
—
string
The column name of the table field - $table_alias
—
string
The alias of the table used for filtering - $type
—
string
The column type of the table field
public
- $null_value
—
mixed
The null value for this type
Methods
public
- __construct() — Constructor
- between() — 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
- exact() — Perform an exact match (equality matching)
- getDefaultSearchMethod() — 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().
- getField() — Creates a field Object based on the field column type
- getFieldName() — Get the field name with the given table alias
- getFieldType() — Get the classname based on the field Type
- getSearchMethods() — Return the search methods available for this field class,
- interval() — Perform an interval search (usually: a date interval check)
- isEmpty() — Is it a null or otherwise empty value?
- outside() — 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)
- partial() — Perform a partial match (usually: search in string)
- search() — Return the SQL where clause for a search