Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Référence de la classe FOFModelField
+ Graphe d'héritage de FOFModelField:

Fonctions membres publiques

 __construct ($db, $field, $table_alias=false)
 
 isEmpty ($value)
 
 getDefaultSearchMethod ()
 
 getSearchMethods ()
 
 exact ($value)
 
 partial ($value)
 
 between ($from, $to, $include=true)
 
 outside ($from, $to, $include=false)
 
 interval ($from, $interval)
 
 range ($from, $to, $include=true)
 
 modulo ($from, $interval, $include=true)
 
 search ($value, $operator='=')
 
 getFieldName ()
 

Fonctions membres publiques statiques

static getField ($field, $config=array())
 
static getFieldType ($type)
 

Champs de données

 $null_value = null
 

Attributs protégés

 $_db = null
 
 $name = ''
 
 $type = ''
 
 $table_alias = false
 

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $db,
  $field,
  $table_alias = false 
)

Constructor

Paramètres
FOFDatabaseDriver$dbThe database object
object$fieldThe field informations as taken from the db
string$table_aliasThe table alias to use when filtering

Références $db, $field, et name.

Documentation des fonctions membres

◆ between()

between (   $from,
  $to,
  $include = true 
)
abstract

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

Paramètres
mixed$fromThe lowest value to compare to
mixed$toThe higherst value to compare to
boolean$includeShould we include the boundaries in the search?
Renvoie
string The SQL where clause for this search

◆ exact()

exact (   $value)

Perform an exact match (equality matching)

Paramètres
mixed$valueThe value to compare to
Renvoie
string The SQL where clause for this search

Références $db, $value, et FOFPlatform\getInstance().

◆ getDefaultSearchMethod()

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

Voir également
self::getSearchMethods()
Renvoie
string

◆ getField()

static getField (   $field,
  $config = array() 
)
static

Creates a field Object based on the field column type

Paramètres
object$fieldThe field informations
array$configThe field configuration (like the db object to use)
Renvoie
FOFModelField The Field object

Références $className, $config, $db, $field, $type, et FOFPlatform\getInstance().

Référencé par FOFModelBehaviorFilters\onAfterBuildQuery().

◆ getFieldName()

getFieldName ( )

Get the field name with the given table alias

Renvoie
string The field name

Références $name, et name.

◆ getFieldType()

static getFieldType (   $type)
static

Get the classname based on the field Type

Paramètres
string$typeThe type of the field
Renvoie
string the class suffix

Références $type.

◆ getSearchMethods()

getSearchMethods ( )

Return the search methods available for this field class,

Renvoie
array

Références $class, et $tmp.

◆ interval()

interval (   $from,
  $interval 
)
abstract

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

Paramètres
string$fromThe value to search
string | array | object$intervalThe interval
Renvoie
string The SQL where clause for this search

◆ isEmpty()

isEmpty (   $value)

Is it a null or otherwise empty value?

Paramètres
mixed$valueThe value to test for emptiness
Renvoie
boolean

Références $value.

◆ modulo()

modulo (   $from,
  $interval,
  $include = true 
)
abstract

Perform an modulo search

Paramètres
integer | float$valueThe starting value of the search space
integer | float$intervalThe interval period of the search space
boolean$includeShould I include the boundaries in the search?
Renvoie
string The SQL where clause

◆ outside()

outside (   $from,
  $to,
  $include = false 
)
abstract

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)

Paramètres
mixed$fromThe lowest value of the excluded range
mixed$toThe higherst value of the excluded range
boolean$includeShould we include the boundaries in the search?
Renvoie
string The SQL where clause for this search

◆ partial()

partial (   $value)
abstract

Perform a partial match (usually: search in string)

Paramètres
mixed$valueThe value to compare to
Renvoie
string The SQL where clause for this search

◆ range()

range (   $from,
  $to,
  $include = true 
)
abstract

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

Paramètres
mixed$fromThe lowest value to compare to
mixed$toThe higherst value to compare to
boolean$includeShould we include the boundaries in the search?
Renvoie
string The SQL where clause for this search

◆ search()

search (   $value,
  $operator = '=' 
)

Return the SQL where clause for a search

Paramètres
mixed$valueThe value to search for
string$operatorThe operator to use
Renvoie
string The SQL where clause for this search

Références $value.

Documentation des champs

◆ $_db

$_db = null
protected

◆ $name

$name = ''
protected

◆ $null_value

$null_value = null

◆ $table_alias

$table_alias = false
protected

◆ $type

$type = ''
protected

La documentation de cette classe a été générée à partir du fichier suivant :