interface ResourceBuilderInterface

ResourceBuilderInterface.

This class is responsible for populating PHP objects using data received from Contentful's API.

Methods

build(array $data, ResourceInterface $resource = null)

Creates or updates an object using given data.

Details

at line 34
ResourceInterface|ResourceArray build(array $data, ResourceInterface $resource = null)

Creates or updates an object using given data.

This method will overwrite properties of the $resource parameter.

Parameters

array $data The raw API data
ResourceInterface $resource A object if it needs to be updated, or null otherwise

Return Value

ResourceInterface|ResourceArray