Tuskfish API
  • Package
  • Class

Packages

  • content
  • core
  • database
  • installation
  • security
  • user
  • utilities

Classes

  • TfishCriteria
  • TfishCriteriaItem
  • TfishDatabase

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.

Package: database
Copyright: Simon Wilkinson 2013-2017 (https://tuskfish.biz)
License: GNU General Public License (GPL) V2
Author: Simon Wilkinson simon@isengard.biz
Version: Release: 1.0
Since: 1.0
Located at trust_path/libraries/tuskfish/class/TfishCriteriaItem.php

Methods summary

public
# __construct( string $column, mixed $value, string $operator = '=' )

Constructor.

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' => "=" // Default value. )

Magic properties

public string $column

Name of column in database table

public mixed $value

Value to compare

public string $operator

The operator to use for evaluation (=, +, >, < etc)

Tuskfish API API documentation generated by ApiGen