Tuskfish API V1.1.2
  • Package
  • Class

Packages

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

Classes

  • TfCriteria
  • TfCriteriaFactory
  • TfCriteriaItem
  • TfDatabase

Class TfCriteriaItem

Represents a single clause in the WHERE component of a database query.

Add TfCriteriaItem to TfCriteria to build your queries. Please see the Tuskfish Developer Guide for a full explanation and examples.

TfCriteriaItem uses TfMagicMethods
Package: database
Copyright: Simon Wilkinson 2013+ (https://tuskfish.biz)
License: GNU General Public License (GPL) V2
Author: Simon Wilkinson simon@isengard.biz
Version: Release: 1.0
Since: 1.0
Uses: trait TfMagicMethods Prevents direct setting of properties / unlisted properties.
Located at trust_path/libraries/tuskfish/class/TfCriteriaItem.php

Methods summary

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

Constructor.

Constructor.

Parameters

$validator
Instance of the Tuskfish data validator class.
$column

Name of column in database table. Alphanumeric and underscore characters only.

$value
Value of the column.
$operator
See getListOfPermittedOperators() for a list of acceptable operators.
public array
# getListOfPermittedOperators( )

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
# setColumn( string $value )

Specifies the column to use in a query clause.

Specifies the column to use in a query clause.

Parameters

$value
Name of column.
public
# setOperator( string $value )

Sets the operator (=, <, >, etc) to use in a query clause.

Sets the operator (=, <, >, etc) to use in a query clause.

Parameters

$value
An operator to use in a clause.
public
# setValue( mixed $value )

Sets the value of a column to use in a query clause.

Sets the value of a column to use in a query clause.

Parameters

$value
Value of column.

Methods used from TfMagicMethods

__get(), __isset(), __set(), __unset()

Properties summary

protected $validator
#
protected boolean $column
# false
protected boolean $value
# false
protected string $operator
# "="

Magic properties

public TfValidator $validator

Instance of the Tuskfish data validator class.

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 V1.1.2 API documentation generated by ApiGen