PHP Class Tobscure\JsonApi\AbstractSerializer

Author: Toby Zerner ([email protected])
Inheritance: implements Tobscure\JsonApi\SerializerInterface
显示文件 Open project: tobscure/json-api Class Usage Examples

Protected Properties

Property Type Description
$type string The type.

Public Methods

Method Description
getAttributes ( $model, array $fields = null )
getId ( $model )
getLinks ( $model )
getMeta ( $model )
getRelationship ( $model, $name )
getType ( $model )

Private Methods

Method Description
getRelationshipMethodName ( string $name ) : string Get the serializer method name for the given relationship.

Method Details

getAttributes() public method

public getAttributes ( $model, array $fields = null )
$fields array

getId() public method

public getId ( $model )

getMeta() public method

public getMeta ( $model )

getRelationship() public method

public getRelationship ( $model, $name )

getType() public method

public getType ( $model )

Property Details

$type protected_oe property

The type.
protected string $type
return string