PHP 클래스 Pheasant\Query\Criteria

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

공개 메소드들

메소드 설명
__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 )