trigger_error(sprintf('The requested service with id %s is deprecated. Please use CamelCased service id instead.',
$name), E_USER_DEPRECATED
);
$resource =
$container->
get('shopware.api.' .
strtolower($name));
} } catch (ServiceNotFoundException
$e) { $name =
ucfirst($name);
$class = __NAMESPACE__ . '\\Resource\\' .
$name;
/** @var Resource\Resource $resource */
$resource =
new $class();
$resource->
setContainer($container);
$resource->
setManager($container->
get(\Shopware\Components\Model\ModelManager::
class));
} if ($container->
initialized('auth'
)) { $resource->
setAcl($container->
get('acl'
));
$resource->
setRole($container->
get('auth'
)->
getIdentity()->role
);
} return $resource;
}}