@@ 31-38 (lines=8) @@ | ||
28 | * @param string $requestedName |
|
29 | * @return bool |
|
30 | */ |
|
31 | public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) |
|
32 | { |
|
33 | if ($serviceLocator instanceof AbstractPluginManager) { |
|
34 | $serviceLocator = $serviceLocator->getServiceLocator(); |
|
35 | } |
|
36 | ||
37 | return $this->factory->canCreateServiceWithName($serviceLocator, $name, $requestedName); |
|
38 | } |
|
39 | ||
40 | /** |
|
41 | * Create service with name |
|
@@ 48-55 (lines=8) @@ | ||
45 | * @param string $requestedName |
|
46 | * @return object |
|
47 | */ |
|
48 | public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) |
|
49 | { |
|
50 | if ($serviceLocator instanceof AbstractPluginManager) { |
|
51 | $serviceLocator = $serviceLocator->getServiceLocator(); |
|
52 | } |
|
53 | ||
54 | return $this->factory->createServiceWithName($serviceLocator, $name, $requestedName); |
|
55 | } |
|
56 | } |
|
57 |