PHP 클래스 FOF30\Model\DataModel\Filter\AbstractFilter

파일 보기 프로젝트 열기: akeeba/fof 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$null_value mixed The null value for this type

보호된 프로퍼티들

프로퍼티 타입 설명
$db
$filterZero boolean Should I allow filtering against the number 0?
$name string The column name of the table field
$tableAlias null Prefix each table name with this table alias. For example, field bar normally creates a WHERE clause: bar = '1' If tableAlias is set to "foo" then the WHERE clause it generates becomes foo.bar = '1'
$type string The column type of the table field

공개 메소드들

메소드 설명
__construct ( JDatabaseDriver $db, object $field ) Constructor
between ( mixed $from, mixed $to, boolean $include = true ) : string 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 ( mixed $value ) : string Perform an exact match (equality matching)
getDefaultSearchMethod ( ) : string 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 ( object $field, array $config = [] ) : AbstractFilter Creates a field Object based on the field column type
getFieldName ( ) : string Get the field name
getFieldType ( string $type ) : string Get the class name based on the field Type
getSearchMethods ( ) : array Return the search methods available for this field class,
interval ( string $from, string | array | object $interval ) : string Perform an interval search (usually: a date interval check)
isEmpty ( mixed $value ) : boolean Is it a null or otherwise empty value?
modulo ( integer | float $from, integer | float $interval, boolean $include = true ) : string Perform an modulo search
outside ( mixed $from, mixed $to, boolean $include = false ) : string 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 ( mixed $value ) : string Perform a partial match (usually: search in string)
range ( mixed $from, mixed $to, boolean $include = true ) : string 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
search ( mixed $value, string $operator = '=' ) : string Return the SQL where clause for a search

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( JDatabaseDriver $db, object $field )
$db JDatabaseDriver The database object
$field object The field information as taken from the db

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
abstract public between ( mixed $from, mixed $to, boolean $include = true ) : string
$from mixed The lowest value to compare to
$to mixed The higherst value to compare to
$include boolean Should we include the boundaries in the search?
리턴 string The SQL where clause for this search

exact() 공개 메소드

Perform an exact match (equality matching)
public exact ( mixed $value ) : string
$value mixed The value to compare to
리턴 string The SQL where clause for this search

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().
또한 보기: self::getSearchMethods()
public getDefaultSearchMethod ( ) : string
리턴 string

getField() 공개 정적인 메소드

Creates a field Object based on the field column type
public static getField ( object $field, array $config = [] ) : AbstractFilter
$field object The field informations
$config array The field configuration (like the db object to use)
리턴 AbstractFilter The Filter object

getFieldName() 공개 메소드

Get the field name
public getFieldName ( ) : string
리턴 string The field name

getFieldType() 공개 정적인 메소드

Get the class name based on the field Type
public static getFieldType ( string $type ) : string
$type string The type of the field
리턴 string the class name suffix

getSearchMethods() 공개 메소드

Return the search methods available for this field class,
public getSearchMethods ( ) : array
리턴 array

interval() 추상적인 공개 메소드

Perform an interval search (usually: a date interval check)
abstract public interval ( string $from, string | array | object $interval ) : string
$from string The value to search
$interval string | array | object The interval
리턴 string The SQL where clause for this search

isEmpty() 공개 메소드

Is it a null or otherwise empty value?
public isEmpty ( mixed $value ) : boolean
$value mixed The value to test for emptiness
리턴 boolean

modulo() 추상적인 공개 메소드

Perform an modulo search
abstract public modulo ( integer | float $from, integer | float $interval, boolean $include = true ) : string
$from integer | float The starting value of the search space
$interval integer | float The interval period of the search space
$include boolean Should I include the boundaries in the search?
리턴 string The SQL where clause

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)
abstract public outside ( mixed $from, mixed $to, boolean $include = false ) : string
$from mixed The lowest value of the excluded range
$to mixed The highest value of the excluded range
$include boolean Should we include the boundaries in the search?
리턴 string The SQL where clause for this search

partial() 추상적인 공개 메소드

Perform a partial match (usually: search in string)
abstract public partial ( mixed $value ) : string
$value mixed The value to compare to
리턴 string The SQL where clause for this search

range() 추상적인 공개 메소드

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
abstract public range ( mixed $from, mixed $to, boolean $include = true ) : string
$from mixed The lowest value to compare to
$to mixed The higherst value to compare to
$include boolean Should we include the boundaries in the search?
리턴 string The SQL where clause for this search

프로퍼티 상세

$db 보호되어 있는 프로퍼티

protected $db

$filterZero 보호되어 있는 프로퍼티

Should I allow filtering against the number 0?
protected bool $filterZero
리턴 boolean

$name 보호되어 있는 프로퍼티

The column name of the table field
protected string $name
리턴 string

$null_value 공개적으로 프로퍼티

The null value for this type
public mixed $null_value
리턴 mixed

$tableAlias 보호되어 있는 프로퍼티

Prefix each table name with this table alias. For example, field bar normally creates a WHERE clause: bar = '1' If tableAlias is set to "foo" then the WHERE clause it generates becomes foo.bar = '1'
protected null $tableAlias
리턴 null

$type 보호되어 있는 프로퍼티

The column type of the table field
protected string $type
리턴 string