Defines a criteria used in the WHERE statement.

author Jorgen Evens
package WebLab
subpackage Data

 Methods

Generate the criteria and set the field to which it applies.

__construct(\WebLab_Data_Field $field) 

Parameters

Sets the criteria to use the BETWEEN keyword, using $value as value.

between(int $low, int $high) : \WebLab_Data_Criteria

Parameters

$low

int

$high

int

Returns

Shorthand for different

diff(mixed $value) : \WebLab_Data_Criteria
see $value )

Parameters

$value

mixed

Returns

Sets the criteria to use the not equals operator, using $value as value.

different(mixed $value) : \WebLab_Data_Criteria

Parameters

$value

mixed

Returns

Shorthand for equals

eq(mixed $value) : \WebLab_Data_Criteria
see $value )

Parameters

$value

mixed

Returns

Sets the criteria to use the equals operator, using $value as value.

equals(mixed $value) : \WebLab_Data_Criteria

Parameters

$value

mixed

Returns

Returns a text representation of the criteria, based on the adapter specifications.

get(object $adapterSpecs) : string

Parameters

$adapterSpecs

object

Returns

string

Sets the criteria to use a greater than operator, using $value as value.

greaterThan(mixed $value) : \WebLab_Data_Criteria

Parameters

$value

mixed

Returns

Shorthand for greaterThan

gt(mixed $value) : \WebLab_Data_Criteria
see $value )

Parameters

$value

mixed

Returns

Sets the criteria to use the IN keyword.

in(array $collection) : \WebLab_Data_Criteria

Parameters

$collection

array

Returns

Sets the criteria to use the IS NULL keyword.

isNull() : \WebLab_Data_Criteria

Sets the criteria to use a less than operator, using $value as value.

lessThan(mixed $value) : \WebLab_Data_Criteria

Parameters

$value

mixed

Returns

Sets the criteria to use the LIKE keyword, using $value as value.

like(mixed $value) : \WebLab_Data_Criteria

Parameters

$value

mixed

Returns

Shorthand for lessThan

lt(mixed $value) : \WebLab_Data_Criteria
see $value )

Parameters

$value

mixed

Returns

Sets the criteria to use the NOT IN keyword.

notIn(array $collection) : \WebLab_Data_Criteria

Parameters

$collection

array

Returns

Sets the criteria to use the NOT NULL keyword.

notNull() : \WebLab_Data_Criteria

Sets the field to which this criteria applies.

setField(\WebLab_Data_Field $field) 

Parameters

 Properties

 

$_action : string

When not an operator is used but a keyword, this will also be stored in this property.

 

$_field : \WebLab_Data_Field
 

$_value : mixed
see \$_action