Propel API
Class

PropelArrayFormatter

class PropelArrayFormatter extends PropelFormatter

Array formatter for Propel query format() returns a PropelArrayCollection of associative arrays

Methods

__construct(ModelCriteria $criteria = null)

from PropelFormatter
PropelFormatter init(ModelCriteria $criteria)

Define the hydration schema based on a query object.

from PropelFormatter
setDbName($dbName)

from PropelFormatter
getDbName()

from PropelFormatter
setClass($class)

from PropelFormatter
getClass()

from PropelFormatter
setPeer($peer)

from PropelFormatter
getPeer()

from PropelFormatter
setWith($withs = array())

from PropelFormatter
getWith()

from PropelFormatter
setAsColumns($asColumns = array())

from PropelFormatter
getAsColumns()

from PropelFormatter
setHasLimit($hasLimit = false)

from PropelFormatter
hasLimit()

from PropelFormatter
array formatRecord(BaseObject $record = null)

Formats an ActiveRecord object

format(PDOStatement $stmt)

formatOne(PDOStatement $stmt)

isObjectFormatter()

checkInit()

from PropelFormatter
getTableMap()

from PropelFormatter
BaseObject getSingleObjectFromRow(array $row, string $class, int $col)

Gets a Propel object hydrated from a selection of columns in statement row

from PropelFormatter
Array getStructuredArrayFromRow(array $row)

Hydrates a series of objects from a result row The first object to hydrate is the model of the Criteria The following objects (the ones added by way of ModelCriteria::with()) are linked to the first one

Details

in PropelFormatter at line 29
public __construct(ModelCriteria $criteria = null)

Parameters

ModelCriteria $criteria

in PropelFormatter at line 44
public PropelFormatter init(ModelCriteria $criteria)

Define the hydration schema based on a query object.

Fills the Formatter's properties using a Criteria as source

Parameters

ModelCriteria $criteria

Return Value

PropelFormatter The current formatter object

in PropelFormatter at line 57
public setDbName($dbName)

Parameters

$dbName

in PropelFormatter at line 62
public getDbName()

in PropelFormatter at line 67
public setClass($class)

Parameters

$class

in PropelFormatter at line 73
public getClass()

in PropelFormatter at line 78
public setPeer($peer)

Parameters

$peer

in PropelFormatter at line 83
public getPeer()

in PropelFormatter at line 88
public setWith($withs = array())

Parameters

$withs

in PropelFormatter at line 93
public getWith()

in PropelFormatter at line 98
public setAsColumns($asColumns = array())

Parameters

$asColumns

in PropelFormatter at line 103
public getAsColumns()

in PropelFormatter at line 108
public setHasLimit($hasLimit = false)

Parameters

$hasLimit

in PropelFormatter at line 113
public hasLimit()

at line 72
public array formatRecord(BaseObject $record = null)

Formats an ActiveRecord object

Parameters

BaseObject $record the object to format

Return Value

array The original record turned into an array

at line 25
public format(PDOStatement $stmt)

Parameters

PDOStatement $stmt

at line 50
public formatOne(PDOStatement $stmt)

Parameters

PDOStatement $stmt

at line 77
public isObjectFormatter()

in PropelFormatter at line 136
public checkInit()

in PropelFormatter at line 143
public getTableMap()

in PropelFormatter at line 190
public BaseObject getSingleObjectFromRow(array $row, string $class, int $col)

Gets a Propel object hydrated from a selection of columns in statement row

Parameters

array $row associative array indexed by column number, as returned by PDOStatement::fetch(PDO::FETCH_NUM)
string $class The classname of the object to create
int $col The start column for the hydration (modified)

Return Value

BaseObject

at line 93
public Array getStructuredArrayFromRow(array $row)

Hydrates a series of objects from a result row The first object to hydrate is the model of the Criteria The following objects (the ones added by way of ModelCriteria::with()) are linked to the first one

Parameters

array $row associative array indexed by column number, as returned by PDOStatement::fetch(PDO::FETCH_NUM)

Return Value

Array