PHP Interface Tobscure\JsonApi\SerializerInterface

Author: Toby Zerner ([email protected])
Exibir arquivo Open project: tobscure/json-api Interface Usage Examples

Public Methods

Method Description
getAttributes ( mixed $model, array $fields = null ) : array Get the attributes array.
getId ( mixed $model ) : string Get the id.
getLinks ( mixed $model ) : array Get the links array.
getMeta ( mixed $model ) : array Get the meta.
getRelationship ( mixed $model, string $name ) : Relationship | null Get a relationship.
getType ( mixed $model ) : string Get the type.

Method Details

getAttributes() public method

Get the attributes array.
public getAttributes ( mixed $model, array $fields = null ) : array
$model mixed
$fields array
return array

getId() public method

Get the id.
public getId ( mixed $model ) : string
$model mixed
return string

getMeta() public method

Get the meta.
public getMeta ( mixed $model ) : array
$model mixed
return array

getRelationship() public method

Get a relationship.
public getRelationship ( mixed $model, string $name ) : Relationship | null
$model mixed
$name string
return Relationship | null

getType() public method

Get the type.
public getType ( mixed $model ) : string
$model mixed
return string