public static function getResource($name) { trigger_error('Using Manager::getResource is deprecated since 5.6 and will be removed with 5.8. Inject the resource instead', E_USER_DEPRECATED
);
$container =
Shopware()->
Container();
try { $serviceId = 'shopware.api.' .
(new CamelCaseToSnakeCaseNameConverter())->
normalize($name);
if ($container->
has($serviceId)) { /** @var Resource\Resource $resource */
$resource =
$container->
get($serviceId);
} else { 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;