PHP Class Art4\JsonApiClient\Document

See also: http://jsonapi.org/format/#document-top-level
Inheritance: implements DocumentInterface, use trait Art4\JsonApiClient\Utils\AccessTrait
Show file Open project: art4/json-api-client Class Usage Examples

Protected Properties

Property Type Description
$container DataContainerInterface
$manager Art4\JsonApiClient\Utils\FactoryManagerInterface

Public Methods

Method Description
__construct ( Art4\JsonApiClient\Utils\FactoryManagerInterface $manager, Art4\JsonApiClient\AccessInterface $parent = null ) : Document
get ( string $key ) : mixed Get a value by the key of this document
parse ( object $object ) : Document

Protected Methods

Method Description
parseData ( null | object $data ) : Art4\JsonApiClient\ElementInterface Parse the data value

Method Details

__construct() public method

public __construct ( Art4\JsonApiClient\Utils\FactoryManagerInterface $manager, Art4\JsonApiClient\AccessInterface $parent = null ) : Document
$manager Art4\JsonApiClient\Utils\FactoryManagerInterface
$parent Art4\JsonApiClient\AccessInterface
return Document

get() public method

Get a value by the key of this document
public get ( string $key ) : mixed
$key string The key of the value
return mixed The value

parse() public method

public parse ( object $object ) : Document
$object object The document body
return Document

parseData() protected method

Parse the data value
protected parseData ( null | object $data ) : Art4\JsonApiClient\ElementInterface
$data null | object Data value
return Art4\JsonApiClient\ElementInterface The parsed data

Property Details

$container protected property

protected DataContainerInterface $container
return DataContainerInterface

$manager protected property

protected FactoryManagerInterface,Art4\JsonApiClient\Utils $manager
return Art4\JsonApiClient\Utils\FactoryManagerInterface