interface MapperInterface

MapperInterface.

This interface must be implemented by those classes that are capable of transforming a raw array of data fetched from the API to an actual PHP object.

Methods

map($resource, array $data)

Maps the given data to a resource.

Details

at line 37
ResourceInterface|ResourceArray map($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

$resource
array $data

Return Value

ResourceInterface|ResourceArray