Format and araay of data according to a provided model

package Gems
copyright Copyright (c) 2011 Erasmus MC
license New BSD License
since Class available since version 1.5

 Methods

__construct()

__construct(array $data, \MUtil_Model_ModelAbstract $model, boolean $formatted = true) : \Gems_FormattedData

Parameters

$data

array

$model

\MUtil_Model_ModelAbstract

$formatted

boolean

Returns

\Gems_FormattedData

current()

current() 

Formats a row of data using the given model

format(array $row, \MUtil_Model_ModelAbstract $model) : array

Static method only available for single rows, for a convenient way of using on a rowset, use the class and iterate

Parameters

$row

array

$model

\MUtil_Model_ModelAbstract

Returns

arrayThe formatted array

getFormatted()

getFormatted() 

setFormatted()

setFormatted($bool) 

Parameters

$bool

This is the actual format function, copied from the Exhibitor for field

_format(\type $name, \type $result, \MUtil_Model_ModelAbstract $model) : \type

Parameters

$name

\type

$result

\type

$model

\MUtil_Model_ModelAbstract

Returns

\type

 Properties

 

A cache for the model options needed to format the data

$_options : array

Default

array()
 

$data

$data : \ArrayObject

Default

 

$formatted

$formatted 

Default

 

$model

$model : \MUtil_Model_ModelAbstract

Default