PHP Класс Pheasant\Query\Criteria

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__call ( $method, $params ) Triggers either the and() or or() methods
__construct ( $where = null, $params = [] ) Constructor
__toString ( )
bind ( $sql, $params = [] ) : string Binds an array of parameters into a string
concatAnd ( ) : Criteria Joins all parameters together with AND
concatOr ( ) : Criteria Joins all parameters together with OR
isEmpty ( ) Returns whether the criteria is empty
toSql ( $braces = true ) Returns the sql representation of the where clause

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

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

Triggers either the and() or or() methods
public __call ( $method, $params )

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

Constructor
public __construct ( $where = null, $params = [] )
$where either a query string, or a key=>val array
$params mixed, parameters to bind into the query string

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

public __toString ( )

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

Binds an array of parameters into a string
public bind ( $sql, $params = [] ) : string
Результат string

concatAnd() публичный статический Метод

Joins all parameters together with AND
public static concatAnd ( ) : Criteria
Результат Criteria

concatOr() публичный статический Метод

Joins all parameters together with OR
public static concatOr ( ) : Criteria
Результат Criteria

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

Returns whether the criteria is empty
public isEmpty ( )

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

Returns the sql representation of the where clause
public toSql ( $braces = true )