Propel API
Class

Criterion

class Criterion

This is an "inner" class that describes an object in the criteria.

In Torque this is an inner class of the Criteria class.

Constants

UND

ODER

Methods

__construct(Criteria $outer, $column, $value, $comparison = null, $type = null)

Create a new instance.

init(Criteria $criteria)

Init some properties with the help of outer class

string getColumn()

Get the column name.

void setTable(name $name)

Set the table name.

string getTable()

Get the table name.

string getComparison()

Get the comparison.

mixed getValue()

Get the value.

DBAdapter getDB()

Get the value of db.

void setDB(DBAdapter $v)

Set the value of db.

Criterion setIgnoreCase(boolean $b)

Sets ignore case.

boolean isIgnoreCase()

Is ignore case on or off?

array getConjunctions()

Get the list of conjunctions in this Criterion

addAnd(Criterion $criterion)

Append an AND Criterion onto this Criterion's list.

Criterion addOr(Criterion $criterion)

Append an OR Criterion onto this Criterion's list.

void appendPsTo(string $sb, array $params)

Appends a Prepared Statement representation of the Criterion onto the buffer.

boolean equals($obj)

This method checks another Criteria to see if they contain the same attributes and hashtable entries.

hashCode()

Returns a hash code value for the object.

array getAllTables()

Get all tables from nested criterion objects

array getAttachedCriterion()

get an array of all criterion attached to this recursing through all sub criterion

__clone()

Ensures deep cloning of attached objects

Details

at line 75
public __construct(Criteria $outer, $column, $value, $comparison = null, $type = null)

Create a new instance.

Parameters

Criteria $outer
$column
$value
$comparison
$type

at line 96
public init(Criteria $criteria)

Init some properties with the help of outer class

Parameters

Criteria $criteria The outer class

at line 119
public string getColumn()

Get the column name.

Return Value

string A String with the column name.

at line 130
public void setTable(name $name)

Set the table name.

Parameters

name $name A String with the table name.

Return Value

void

at line 140
public string getTable()

Get the table name.

Return Value

string A String with the table name.

at line 150
public string getComparison()

Get the comparison.

Return Value

string A String with the comparison.

at line 160
public mixed getValue()

Get the value.

Return Value

mixed An Object with the value.

at line 171
public DBAdapter getDB()

Get the value of db.

The DBAdapter which might be used to get db specific
variations of sql.

Return Value

DBAdapter value of db.

at line 182
public void setDB(DBAdapter $v)

Set the value of db.

The DBAdapter might be used to get db specific variations of sql.

Parameters

DBAdapter $v Value to assign to db.

Return Value

void

at line 196
public Criterion setIgnoreCase(boolean $b)

Sets ignore case.

Parameters

boolean $b True if case should be ignored.

Return Value

Criterion A modified Criterion object.

at line 208
public boolean isIgnoreCase()

Is ignore case on or off?

Return Value

boolean True if case is ignored.

at line 226
public array getConjunctions()

Get the list of conjunctions in this Criterion

Return Value

array

at line 234
public addAnd(Criterion $criterion)

Append an AND Criterion onto this Criterion's list.

Parameters

Criterion $criterion

at line 246
public Criterion addOr(Criterion $criterion)

Append an OR Criterion onto this Criterion's list.

Parameters

Criterion $criterion

Return Value

Criterion

at line 264
public void appendPsTo(string $sb, array $params)

Appends a Prepared Statement representation of the Criterion onto the buffer.

Parameters

string $sb &$sb The string that will receive the Prepared Statement
array $params A list to which Prepared Statement parameters will be appended

Return Value

void

Exceptions

PropelException - if the expression builder cannot figure out how to turn a specified expression into proper SQL.

at line 463
public boolean equals($obj)

This method checks another Criteria to see if they contain the same attributes and hashtable entries.

Parameters

$obj

Return Value

boolean

at line 503
public hashCode()

Returns a hash code value for the object.

at line 534
public array getAllTables()

Get all tables from nested criterion objects

Return Value

array

at line 560
public array getAttachedCriterion()

get an array of all criterion attached to this recursing through all sub criterion

Return Value

array Criterion[]

at line 573
public __clone()

Ensures deep cloning of attached objects