package Default
inherited_from \Zend\Db\Sql\AbstractExpression

 Methods

Constructor

__construct(integer|float|boolean|string $left = null, string $operator = self::OPERATOR_EQUAL_TO, integer|float|boolean|string $right = null, string $leftType = self::TYPE_IDENTIFIER, string $rightType = self::TYPE_VALUE

Parameters

$left

integerfloatbooleanstring

$operator

string

$right

integerfloatbooleanstring

$leftType

string

TYPE_IDENTIFIER or TYPE_VALUE by default TYPE_IDENTIFIER {@see allowedTypes}

$rightType

string

TYPE_IDENTIFIER or TYPE_VALUE by default TYPE_VALUE {@see allowedTypes}

Get predicate parts for where statement

getExpressionData() : array

Returns

array

Get left side of operator

getLeft() : integer | float | boolean | string

Returns

integerfloatbooleanstring

Get parameter type on left side of operator

getLeftType() : string

Returns

string

Get operator string

getOperator() : string

Returns

string

Get right side of operator

getRight() : integer | float | boolean | string

Returns

integerfloatbooleanstring

Get parameter type on right side of operator

getRightType() : string

Returns

string

Set left side of operator

setLeft(integer|float|boolean|string $left) : \Zend\Db\Sql\Predicate\Operator

Parameters

$left

integerfloatbooleanstring

Returns

\Zend\Db\Sql\Predicate\Operator

Set parameter type for left side of operator

setLeftType(string $type) : \Zend\Db\Sql\Predicate\Operator

Parameters

$type

string

TYPE_IDENTIFIER or TYPE_VALUE {@see allowedTypes}

Exceptions

\Zend\Db\Sql\Exception\InvalidArgumentException

Returns

\Zend\Db\Sql\Predicate\Operator

Set operator string

setOperator(string $operator) : \Zend\Db\Sql\Predicate\Operator

Parameters

$operator

string

Returns

\Zend\Db\Sql\Predicate\Operator

Set right side of operator

setRight(integer|float|boolean|string $right) : \Zend\Db\Sql\Predicate\Operator

Parameters

$right

integerfloatbooleanstring

Returns

\Zend\Db\Sql\Predicate\Operator

Set parameter type for right side of operator

setRightType(string $type) : \Zend\Db\Sql\Predicate\Operator

Parameters

$type

string

TYPE_IDENTIFIER or TYPE_VALUE {@see allowedTypes}

Exceptions

\Zend\Db\Sql\Exception\InvalidArgumentException

Returns

\Zend\Db\Sql\Predicate\Operator

Normalize Argument

normalizeArgument(mixed $argument, string $defaultType = self::TYPE_VALUE) : array
Inherited

Parameters

$argument

mixed

$defaultType

string

Exceptions

\Zend\Db\Sql\Exception\InvalidArgumentException

Returns

array

buildNormalizedArgument()

buildNormalizedArgument(mixed $argument, string $argumentType) : array
Inherited

Parameters

$argument

mixed

$argumentType

string

Exceptions

\Zend\Db\Sql\Exception\InvalidArgumentException

Returns

array

 Properties

 

$allowedTypes

$allowedTypes 

Default

array(self::TYPE_IDENTIFIER, self::TYPE_VALUE)
inherited_from \Zend\Db\Sql\AbstractExpression::allowedTypes
 

$allowedTypes

$allowedTypes : array<mixed,string>

Default

array(self::TYPE_IDENTIFIER, self::TYPE_LITERAL, self::TYPE_SELECT, self::TYPE_VALUE)
 

$left

$left : integer | float | boolean | string

Default

 

$leftType

$leftType : string

Default

self::TYPE_IDENTIFIER
 

$operator

$operator : string

Default

self::OPERATOR_EQUAL_TO
 

$right

$right : integer | float | boolean | string

Default

 

$rightType

$rightType : string

Default

self::TYPE_VALUE

 Constants

 

OPERATOR_EQUAL_TO

OPERATOR_EQUAL_TO = '=' 
 

OPERATOR_GREATER_THAN

OPERATOR_GREATER_THAN = '>' 
 

OPERATOR_GREATER_THAN_OR_EQUAL_TO

OPERATOR_GREATER_THAN_OR_EQUAL_TO = '>=' 
 

OPERATOR_LESS_THAN

OPERATOR_LESS_THAN = '<' 
 

OPERATOR_LESS_THAN_OR_EQUAL_TO

OPERATOR_LESS_THAN_OR_EQUAL_TO = '<=' 
 

OPERATOR_NOT_EQUAL_TO

OPERATOR_NOT_EQUAL_TO = '!=' 
 

OP_EQ

OP_EQ = '=' 
 

OP_GT

OP_GT = '>' 
 

OP_GTE

OP_GTE = '>=' 
 

OP_LT

OP_LT = '<' 
 

OP_LTE

OP_LTE = '<=' 
 

OP_NE

OP_NE = '!='