class Locale extends BaseMapper

Locale class.

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

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 110
protected SystemProperties buildSystemProperties(array $sys)

Parameters

array $sys

Return Value

SystemProperties

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

Parameters

mixed $fieldData
string|null $locale

Return Value

array

at line 39
protected bool injectClient()

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

Return Value

bool

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

{@inheritdoc}

Parameters

$resource
array $data