class Entry extends BaseMapper

Entry class.

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

Properties

protected ResourceBuilder $builder from BaseMapper
protected Client $client from BaseMapper

Methods

__construct(ResourceBuilder $builder, Client $client)

BaseMapper constructor.

ResourceInterface|ResourceArray
hydrate(string|object $target, array $data)

No description

buildSystemProperties(array $sys)

No description

array
normalizeFieldData(mixed $fieldData, string|null $locale)

No description

bool
injectClient()

Override this method for blocking the mapper from injecting the client property.

map($resource, array $data)

{@inheritdoc}

Details

in BaseMapper at line 46
__construct(ResourceBuilder $builder, Client $client)

BaseMapper constructor.

Parameters

ResourceBuilder $builder
Client $client

in BaseMapper at line 58
protected ResourceInterface|ResourceArray hydrate(string|object $target, array $data)

Parameters

string|object $target either a FQCN, or an object whose class will be automatically inferred
array $data

Return Value

ResourceInterface|ResourceArray

in BaseMapper at line 104
protected SystemProperties buildSystemProperties(array $sys)

Parameters

array $sys

Return Value

SystemProperties

in BaseMapper at line 117
protected array normalizeFieldData(mixed $fieldData, string|null $locale)

Parameters

mixed $fieldData
string|null $locale

Return Value

array

in BaseMapper at line 131
protected bool injectClient()

Override this method for blocking the mapper from injecting the client property.

Return Value

bool

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

{@inheritdoc}

Parameters

$resource
array $data