Propel API
Class

ModelCriterion

class ModelCriterion extends Criterion

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

Constants

UND

ODER

Methods

__construct(Criteria $outer, $column, $value = null, $comparison = ModelCriteria::MODEL_CLAUSE, $clause, $type = null)

Create a new instance.

init(Criteria $criteria)

Init some properties with the help of outer class

from Criterion
string getColumn()

Get the column name.

from Criterion
void setTable(name $name)

Set the table name.

from Criterion
string getTable()

Get the table name.

from Criterion
string getComparison()

Get the comparison.

from Criterion
mixed getValue()

Get the value.

from Criterion
DBAdapter getDB()

Get the value of db.

from Criterion
void setDB(DBAdapter $v)

Set the value of db.

from Criterion
Criterion setIgnoreCase(boolean $b)

Sets ignore case.

from Criterion
boolean isIgnoreCase()

Is ignore case on or off?

from Criterion
array getConjunctions()

Get the list of conjunctions in this Criterion

from Criterion
addAnd(Criterion $criterion)

Append an AND Criterion onto this Criterion's list.

from Criterion
Criterion addOr(Criterion $criterion)

Append an OR Criterion onto this Criterion's list.

from Criterion
void appendPsTo(string $sb, array $params)

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

from Criterion
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

from Criterion
array getAttachedCriterion()

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

from Criterion
__clone()

Ensures deep cloning of attached objects

from Criterion
getClause()

appendModelClauseToPs(string $sb, array $params)

Appends a Prepared Statement representation of the ModelCriterion onto the buffer For regular model clauses, e.g.

appendModelClauseLikeToPs(string $sb, array $params)

Appends a Prepared Statement representation of the ModelCriterion onto the buffer For LIKE model clauses, e.g.

appendModelClauseSeveralToPs(string $sb, array $params)

Appends a Prepared Statement representation of the ModelCriterion onto the buffer For ternary model clauses, e.G 'book.ID BETWEEN ? AND ?'

appendModelClauseArrayToPs(string $sb, array $params)

Appends a Prepared Statement representation of the ModelCriterion onto the buffer For IN or NOT IN model clauses, e.g.

Details

at line 31
public __construct(Criteria $outer, $column, $value = null, $comparison = ModelCriteria::MODEL_CLAUSE, $clause, $type = null)

Create a new instance.

Parameters

Criteria $outer
$column
$value
$comparison
$clause
$type

in Criterion at line 96
public init(Criteria $criteria)

Init some properties with the help of outer class

Parameters

Criteria $criteria The outer class

in Criterion at line 119
public string getColumn()

Get the column name.

Return Value

string A String with the column name.

in Criterion at line 130
public void setTable(name $name)

Set the table name.

Parameters

name $name A String with the table name.

Return Value

void

in Criterion at line 140
public string getTable()

Get the table name.

Return Value

string A String with the table name.

in Criterion at line 150
public string getComparison()

Get the comparison.

Return Value

string A String with the comparison.

in Criterion at line 160
public mixed getValue()

Get the value.

Return Value

mixed An Object with the value.

in Criterion 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.

in Criterion 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

in Criterion 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.

in Criterion at line 207
public boolean isIgnoreCase()

Is ignore case on or off?

Return Value

boolean True if case is ignored.

in Criterion at line 225
public array getConjunctions()

Get the list of conjunctions in this Criterion

Return Value

array

in Criterion at line 233
public addAnd(Criterion $criterion)

Append an AND Criterion onto this Criterion's list.

Parameters

Criterion $criterion

in Criterion at line 244
public Criterion addOr(Criterion $criterion)

Append an OR Criterion onto this Criterion's list.

Parameters

Criterion $criterion

Return Value

Criterion

in Criterion at line 261
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 220
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 261
public hashCode()

Returns a hash code value for the object.

in Criterion at line 527
public array getAllTables()

Get all tables from nested criterion objects

Return Value

array

in Criterion at line 552
public array getAttachedCriterion()

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

Return Value

array Criterion[]

in Criterion at line 564
public __clone()

Ensures deep cloning of attached objects

at line 54
public getClause()

at line 123
public appendModelClauseToPs(string $sb, array $params)

Appends a Prepared Statement representation of the ModelCriterion onto the buffer For regular model clauses, e.g.

'book.TITLE = ?'

Parameters

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

at line 141
public appendModelClauseLikeToPs(string $sb, array $params)

Appends a Prepared Statement representation of the ModelCriterion onto the buffer For LIKE model clauses, e.g.

'book.TITLE LIKE ?'
Handles case insensitivity for VARCHAR columns

Parameters

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

at line 158
public appendModelClauseSeveralToPs(string $sb, array $params)

Appends a Prepared Statement representation of the ModelCriterion onto the buffer For ternary model clauses, e.G 'book.ID BETWEEN ? AND ?'

Parameters

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

at line 181
public appendModelClauseArrayToPs(string $sb, array $params)

Appends a Prepared Statement representation of the ModelCriterion onto the buffer For IN or NOT IN model clauses, e.g.

'book.TITLE NOT IN ?'

Parameters

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