PHP Class PhalconRest\Transformers\ModelTransformer

Inheritance: extends Transformer
Show file Open project: olivierandriessen/phalcon-rest

Protected Properties

Property Type Description
$modelAttributes
$modelClass
$modelColumnMap
$modelDataTypes

Public Methods

Method Description
getModelClass ( )
getModelDataTypes ( )
getResponseProperties ( )
setModelClass ( $modelClass )
transform ( $item )

Protected Methods

Method Description
additionalFields ( $item )
excludedProperties ( ) : array
getFieldValue ( $item, $propertyName, $fieldName )
getMappedDatabaseType ( $type )
getModel ( $item )
getModelAttributes ( )
getModelColumnMap ( )
includedProperties ( ) : array
keyMap ( ) : array Returns keyMap to be used.
typeMap ( )

Method Details

additionalFields() protected method

protected additionalFields ( $item )

excludedProperties() protected method

protected excludedProperties ( ) : array
return array Properties to be excluded in the response

getFieldValue() protected method

protected getFieldValue ( $item, $propertyName, $fieldName )

getMappedDatabaseType() protected method

protected getMappedDatabaseType ( $type )

getModel() protected method

protected getModel ( $item )

getModelAttributes() protected method

protected getModelAttributes ( )

getModelClass() public method

public getModelClass ( )

getModelColumnMap() protected method

protected getModelColumnMap ( )

getModelDataTypes() public method

public getModelDataTypes ( )

getResponseProperties() public method

includedProperties() protected method

protected includedProperties ( ) : array
return array Properties to be included in the response

keyMap() protected method

Keys are the model properties, values are the response keys
protected keyMap ( ) : array
return array

setModelClass() public method

public setModelClass ( $modelClass )

transform() public method

public transform ( $item )

typeMap() protected method

protected typeMap ( )

Property Details

$modelAttributes protected property

protected $modelAttributes

$modelClass protected property

protected $modelClass

$modelColumnMap protected property

protected $modelColumnMap

$modelDataTypes protected property

protected $modelDataTypes