class Asset extends BaseMapper

Asset class.

This class is responsible for converting raw API data into a PHP object of class Contentful\Management\Resource\Asset.

Properties

protected ResourceBuilder $builder from BaseMapper
protected ObjectHydrator $hydrator from BaseMapper

Methods

__construct(ResourceBuilder $builder)

BaseMapper constructor.

map($resource, array $data)

{@inheritdoc}

buildFile(array $data)

Returns a PHP object representation of a file stored in Contentful.

Details

in BaseMapper at line 36
__construct(ResourceBuilder $builder)

BaseMapper constructor.

Parameters

ResourceBuilder $builder

at line 34
map($resource, array $data)

{@inheritdoc}

Parameters

$resource
array $data

at line 54
protected buildFile(array $data)

Returns a PHP object representation of a file stored in Contentful.

Parameters

array $data The contents of the "asset.file.[locale]" array