/**
* Applies the model mapping strategy for a converted resource to determine the final target type.
* The strategy is NOT applied if $source['__type'] is set (overriding was allowed then, otherwise an exception would have been thrown earlier).
*
* @param string $originalTargetType The original target type determined so far
* @param PersistentResource $resource The resource that is to be converted to a media file.
* @param array $source the original source properties for this type converter.
* @return string Class name of the media model to use for the given resource
*/
protected function applyModelMappingStrategy($originalTargetType, PersistentResource $resource, array $source = array())
{
$finalTargetType = $originalTargetType;
if (!isset($source['__type'])) {
$finalTargetType = $this->assetModelMappingStrategy->map($resource, $source);
}
return $finalTargetType;
}