package Default

 Methods

Constructor

__construct(null|array $predicates = null, string $defaultCombination = self::COMBINED_BY_AND

Parameters

$predicates

nullarray

$defaultCombination

string

Add predicate to set

addPredicate(\Zend\Db\Sql\Predicate\PredicateInterface $predicate, string $combination = null) : \Zend\Db\Sql\Predicate\PredicateSet

Parameters

$predicate

\Zend\Db\Sql\Predicate\PredicateInterface

$combination

string

Returns

\Zend\Db\Sql\Predicate\PredicateSet

Add predicates to set

addPredicates(\Zend\Db\Sql\Predicate\PredicateInterface|\Closure|string|array $predicates, string $combination = self::OP_AND) : \Zend\Db\Sql\Predicate\PredicateSet

Parameters

$predicates

\Zend\Db\Sql\Predicate\PredicateInterface\Closurestringarray

$combination

string

Returns

\Zend\Db\Sql\Predicate\PredicateSet

Add predicate using AND operator

andPredicate(\Zend\Db\Sql\Predicate\PredicateInterface $predicate) : \Zend\Db\Sql\Predicate\PredicateSet

Parameters

$predicate

\Zend\Db\Sql\Predicate\PredicateInterface

Returns

\Zend\Db\Sql\Predicate\PredicateSet

Get count of attached predicates

count() : integer

Returns

integer

Get predicate parts for where statement

getExpressionData() : array

Returns

array

Return the predicates

getPredicates() : array<mixed,\Zend\Db\Sql\Predicate\PredicateInterface>

Returns

array<mixed,\Zend\Db\Sql\Predicate\PredicateInterface>

Add predicate using OR operator

orPredicate(\Zend\Db\Sql\Predicate\PredicateInterface $predicate) : \Zend\Db\Sql\Predicate\PredicateSet

Parameters

$predicate

\Zend\Db\Sql\Predicate\PredicateInterface

Returns

\Zend\Db\Sql\Predicate\PredicateSet

 Properties

 

$defaultCombination

$defaultCombination 

Default

self::COMBINED_BY_AND
 

$predicates

$predicates 

Default

array()

 Constants

 

COMBINED_BY_AND

COMBINED_BY_AND = 'AND' 
 

COMBINED_BY_OR

COMBINED_BY_OR = 'OR' 
 

OP_AND

OP_AND = 'AND' 
 

OP_OR

OP_OR = 'OR'