class ContentType extends BaseMapper

ContentType class.

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

Properties

protected ResourceBuilder $builder from BaseMapper

Methods

__construct(ResourceBuilder $builder)

BaseMapper constructor.

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

No description

ResourceInterface|ResourceArray
map(ResourceInterface|null $resource, array $data)

Maps the given data to a resource.

mapField(array $data)

No description

Details

in BaseMapper at line 37
__construct(ResourceBuilder $builder)

BaseMapper constructor.

Parameters

ResourceBuilder $builder

in BaseMapper at line 48
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

at line 28
ResourceInterface|ResourceArray map(ResourceInterface|null $resource, array $data)

Maps the given data to a resource.

ATTENTION: This will directly modify the given resource. If $resource is "null", the method is expected to create a new instance of the appropriate class.

Parameters

ResourceInterface|null $resource
array $data

Return Value

ResourceInterface|ResourceArray

at line 45
protected FieldInterface mapField(array $data)

Parameters

array $data

Return Value

FieldInterface