PHP Интерфейс Tobscure\JsonApi\SerializerInterface

Автор: Toby Zerner ([email protected])
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
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.

Описание методов

getAttributes() публичный Метод

Get the attributes array.
public getAttributes ( mixed $model, array $fields = null ) : array
$model mixed
$fields array
Результат array

getId() публичный Метод

Get the id.
public getId ( mixed $model ) : string
$model mixed
Результат string

getMeta() публичный Метод

Get the meta.
public getMeta ( mixed $model ) : array
$model mixed
Результат array

getRelationship() публичный Метод

Get a relationship.
public getRelationship ( mixed $model, string $name ) : Relationship | null
$model mixed
$name string
Результат Relationship | null

getType() публичный Метод

Get the type.
public getType ( mixed $model ) : string
$model mixed
Результат string