PHP Класс Habari\QueryWhere

См. также: Query
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$expressions
$operator
$parameters

Открытые методы

Метод Описание
__construct ( string $operator = 'AND' ) Constructor for the QueryWhere
__get ( string $name ) : mixed Get a parameter value, class magic __get method
__set ( string $name, mixed $value ) : mixed Set a parameter value, class magic __set method
add ( string | QueryWhere $expression, array $parameters = [], string $name = null ) : QueryWhere
count ( ) : integer Get the number of expressions contained in this QueryWhere
create ( string $operator = 'AND' ) : QueryWhere Convenience function for fluid interface
exists ( Query $values, string $paramname = null, boolean $positive = true ) : QueryWhere Shortcut to implementing an EXISTS test for one or more values as a new expression
get ( integer $level ) : string Obtain the where clause as a string to use in a query
get_named ( string $name ) : null | string | QueryWhere Return the named expression from this QueryWhere
in ( $field, $values, string $paramname = null, callback $validator = null, boolean $positive = true ) : QueryWhere Shortcut to implementing an IN or equality test for one or more values as a new expression
params ( ) : array Obtain the parameters supplied for the where clause

Описание методов

__construct() публичный Метод

Constructor for the QueryWhere
public __construct ( string $operator = 'AND' )
$operator string The operator (AND/OR) to user between expressions in this clause

__get() публичный Метод

Get a parameter value, class magic __get method
public __get ( string $name ) : mixed
$name string The name of the parameter to get
Результат mixed The value of the parameter requested

__set() публичный Метод

Set a parameter value, class magic __set method
public __set ( string $name, mixed $value ) : mixed
$name string The name of the parameter to set
$value mixed The value to set the parameter to
Результат mixed The supplied value

add() публичный Метод

public add ( string | QueryWhere $expression, array $parameters = [], string $name = null ) : QueryWhere
$expression string | QueryWhere A string expression to use as part of the query's where clause or a compound expression represented by an additional QueryWhere instance
$parameters array An associative array of values to use as named parameters in the added expression
$name string Name of the expression
Результат QueryWhere Returns $this, for fluid interface.

count() публичный Метод

Get the number of expressions contained in this QueryWhere
public count ( ) : integer
Результат integer Number of expressions.

create() публичный Метод

Convenience function for fluid interface
public create ( string $operator = 'AND' ) : QueryWhere
$operator string The operator (AND/OR) to user between expressions in this clause
Результат QueryWhere Configured instance of the QueryWhere

exists() публичный Метод

Shortcut to implementing an EXISTS test for one or more values as a new expression
public exists ( Query $values, string $paramname = null, boolean $positive = true ) : QueryWhere
$values Query
$paramname string
$positive boolean
Результат QueryWhere Returns $this, for fluid interface

get() публичный Метод

Obtain the where clause as a string to use in a query
public get ( integer $level ) : string
$level integer Used internally to retain indenting
Результат string The where clause represented by this object

get_named() публичный Метод

Return the named expression from this QueryWhere
public get_named ( string $name ) : null | string | QueryWhere
$name string The name provided for the expression
Результат null | string | QueryWhere The requested expression

in() публичный Метод

Shortcut to implementing an IN or equality test for one or more values as a new expression
public in ( $field, $values, string $paramname = null, callback $validator = null, boolean $positive = true ) : QueryWhere
$field
$values
$paramname string
$validator callback
$positive boolean
Результат QueryWhere Returns $this, for fluid interface

params() публичный Метод

Obtain the parameters supplied for the where clause
public params ( ) : array
Результат array An associative array of parameters added to this where clause

Описание свойств

$expressions защищенное свойство

protected $expressions

$operator защищенное свойство

protected $operator

$parameters защищенное свойство

protected $parameters