PHP Class WoohooLabs\Yin\JsonApi\Document\AbstractDocument

Show file Open project: woohoolabs/yin

Public Methods

Method Description
getJsonApi ( ) : WoohooLabs\Yin\JsonApi\Schema\JsonApi | null Provides information about the "jsonApi" section of the current document.
getLinks ( ) : WoohooLabs\Yin\JsonApi\Schema\Links | null Provides information about the "links" section of the current document.
getMeta ( ) : array Provides information about the "meta" section of the current document.

Protected Methods

Method Description
transformBaseContent ( array $additionalMeta = [] ) : array
transformJsonApiContent ( array &$content )
transformLinksContent ( array &$content )
transformMetaContent ( array &$content, array $additionalMeta = [] )

Method Details

getJsonApi() abstract public method

The method returns a new JsonApi schema object if this section should be present or null if it should be omitted from the response.
abstract public getJsonApi ( ) : WoohooLabs\Yin\JsonApi\Schema\JsonApi | null
return WoohooLabs\Yin\JsonApi\Schema\JsonApi | null

getMeta() abstract public method

The method returns an array of non-standard meta information about the document. If this array is empty, the section won't appear in the response.
abstract public getMeta ( ) : array
return array

transformBaseContent() protected method

protected transformBaseContent ( array $additionalMeta = [] ) : array
$additionalMeta array
return array

transformJsonApiContent() protected method

protected transformJsonApiContent ( array &$content )
$content array

transformLinksContent() protected method

protected transformLinksContent ( array &$content )
$content array

transformMetaContent() protected method

protected transformMetaContent ( array &$content, array $additionalMeta = [] )
$content array
$additionalMeta array