Class TfishCriteriaItem
Clause composer class for SQLite database
Represents a single clause in the WHERE component of a database query. Add TfishCriteriaItem to
TfishCriteria to build your queries. Please see the Tuskfish Developer Guide for a full
explanation and examples.
Methods summary
public
|
#
__construct( string $column, mixed $value, string $operator = '=' )
Constructor.
Parameters
- $column
Name of column in database table. Alphanumeric and underscore
characters only.
- $value
- Value of the column.
- $operator
- See permittedOperators() for a list of acceptable operators.
|
public
mixed|null
|
#
__get( string $property )
Get the value of an object property.
Get the value of an object property.
Intercepts direct calls to access an object property. This method can be modified to impose
processing logic to the value before returning it.
Parameters
- $property
- Name of property.
Returns
mixed|null $property Value if it is set; otherwise null.
|
public
array
|
#
permittedOperators( )
Provides a whitelist of permitted operators for use in database queries.
Provides a whitelist of permitted operators for use in database queries.
Returns
array Array of permitted operators for use in database queries.
|
public
|
#
__set( string $property, mixed $value )
Set the value of an object property and will not allow non-whitelisted properties to be set.
Set the value of an object property and will not allow non-whitelisted properties to be set.
Intercepts direct calls to set the value of an object property. This method can be modified
to impose data type restrictions and range checks before allowing the property
to be set.
Parameters
- $property
- Name of property.
- $value
- Value of property.
|
public
boolean
|
#
__isset( string $property )
Check if an object property is set.
Check if an object property is set.
Intercepts isset() calls to correctly read object properties. Can be modified to add
processing logic for specific properties.
Parameters
- $property
- Name of property.
Returns
boolean True if set otherwise false.
|
public
boolean
|
#
__unset( string $property )
Unsets an object property.
Unsets an object property.
Intercepts unset() calls to correctly unset object properties. Can be modified to add
processing logic for specific properties.
Parameters
- $property
- Name of property.
Returns
boolean True on success false on failure.
|
Properties summary
protected
array
|
$__data
$__data Array holding values of this object properties, accessed via magic methods.
$__data Array holding values of this object properties, accessed via magic methods.
|
#
array(
'column' => false,
'value' => false,
'operator' => "="
)
|
Magic properties
public
string
|
$column
Name of column in database table
|
public
mixed
|
$value
|
public
string
|
$operator
The operator to use for evaluation (=, +, >, < etc)
|