Propel 2 API
Class

Propel\Runtime\Formatter\ObjectFormatter

class ObjectFormatter extends AbstractFormatter

Object formatter for Propel query format() returns a ObjectCollection of Propel model objects

Methods

__construct(BaseModelCriteria $criteria = null, DataFetcherInterface $dataFetcher = null)

from AbstractFormatter
setDataFetcher(DataFetcherInterface $dataFetcher)

Sets a DataFetcherInterface object.

from AbstractFormatter
DataFetcherInterface getDataFetcher()

Returns the current DataFetcherInterface object.

from AbstractFormatter
AbstractFormatter init(BaseModelCriteria $criteria, DataFetcherInterface $dataFetcher = null)

Define the hydration schema based on a query object.

from AbstractFormatter
setDbName($dbName)

from AbstractFormatter
getDbName()

from AbstractFormatter
setClass($class)

from AbstractFormatter
getClass()

from AbstractFormatter
setWith($withs = array())

from AbstractFormatter
getWith()

from AbstractFormatter
setAsColumns($asColumns = array())

from AbstractFormatter
getAsColumns()

from AbstractFormatter
setHasLimit($hasLimit = false)

from AbstractFormatter
hasLimit()

from AbstractFormatter
getCollectionClassName()

BaseObject formatRecord(BaseObject $record = null)

Formats an ActiveRecord object

from AbstractFormatter
format(DataFetcherInterface $dataFetcher = null)

formatOne(DataFetcherInterface $dataFetcher = null)

isObjectFormatter()

checkInit()

from AbstractFormatter
getTableMap()

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

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

from AbstractFormatter
BaseObject getAllObjectsFromRow(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 AbstractFormatter at line 46
public __construct(BaseModelCriteria $criteria = null, DataFetcherInterface $dataFetcher = null)

Parameters

BaseModelCriteria $criteria
DataFetcherInterface $dataFetcher

in AbstractFormatter at line 63
public setDataFetcher(DataFetcherInterface $dataFetcher)

Sets a DataFetcherInterface object.

Parameters

DataFetcherInterface $dataFetcher

in AbstractFormatter at line 73
public DataFetcherInterface getDataFetcher()

Returns the current DataFetcherInterface object.

Return Value

DataFetcherInterface

in AbstractFormatter at line 87
public AbstractFormatter init(BaseModelCriteria $criteria, DataFetcherInterface $dataFetcher = null)

Define the hydration schema based on a query object.

Fills the Formatter's properties using a Criteria as source

Parameters

BaseModelCriteria $criteria
DataFetcherInterface $dataFetcher

Return Value

AbstractFormatter The current formatter object

in AbstractFormatter at line 103
public setDbName($dbName)

Parameters

$dbName

in AbstractFormatter at line 108
public getDbName()

in AbstractFormatter at line 113
public setClass($class)

Parameters

$class

in AbstractFormatter at line 119
public getClass()

in AbstractFormatter at line 124
public setWith($withs = array())

Parameters

$withs

in AbstractFormatter at line 129
public getWith()

in AbstractFormatter at line 134
public setAsColumns($asColumns = array())

Parameters

$asColumns

in AbstractFormatter at line 139
public getAsColumns()

in AbstractFormatter at line 144
public setHasLimit($hasLimit = false)

Parameters

$hasLimit

in AbstractFormatter at line 149
public hasLimit()

at line 59
public getCollectionClassName()

in AbstractFormatter at line 184
public BaseObject formatRecord(BaseObject $record = null)

Formats an ActiveRecord object

Parameters

BaseObject $record the object to format

Return Value

BaseObject The original record

at line 24
public format(DataFetcherInterface $dataFetcher = null)

Parameters

DataFetcherInterface $dataFetcher

at line 64
public formatOne(DataFetcherInterface $dataFetcher = null)

Parameters

DataFetcherInterface $dataFetcher

at line 82
public isObjectFormatter()

in AbstractFormatter at line 195
public checkInit()

in AbstractFormatter at line 202
public getTableMap()

in AbstractFormatter at line 251
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 DataFetcher::fetch()
string $class The classname of the object to create
int $col The start column for the hydration (modified)

Return Value

BaseObject

at line 97
public BaseObject getAllObjectsFromRow(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 DataFetcher::fetch()

Return Value

BaseObject