interface AssetModelMappingStrategyInterface (View source)

Describes a strategy to find an asset model class based on the resource and optional source properties.

Methods

string
map(PersistentResource $resource, array $additionalProperties = [])

Map the given resource to a media model class.

Details

string map(PersistentResource $resource, array $additionalProperties = [])

Map the given resource to a media model class.

MUST always return a fully qualified class name for a media model. If you need to fallback to different strategies you need to implement a "ConjunctionStrategy", but in the end you have to return a final class name.

Parameters

PersistentResource $resource
array $additionalProperties

Optional properties that can be taken into account for deciding the model class. what you get here can depend on the caller, so you should always fallback to something based on the resource.

Return Value

string

the determined target class name