createService($container, $name, $requestedName); } /** * {@inheritDoc} */ public function canCreate(ContainerInterface $container, $requestedName) { if ($this->instanceManager->hasSharedInstance($requestedName) || $this->instanceManager->hasAlias($requestedName) || $this->instanceManager->hasConfig($requestedName) || $this->instanceManager->hasTypePreferences($requestedName) ) { return true; } if (! $this->definitions->hasClass($requestedName) || interface_exists($requestedName)) { return false; } return true; } /** * {@inheritDoc} */ public function canCreateServiceWithName(ServiceLocatorInterface $container, $name, $requestedName) { return $this->canCreate($container, $requestedName); } }