| @@ 141-147 (lines=7) @@ | ||
| 138 | { |
|
| 139 | $this->init($serviceLocator); |
|
| 140 | ||
| 141 | if (array_key_exists($requestedName, $this->prototype)) { |
|
| 142 | if (!is_object($this->prototype[$requestedName])) { |
|
| 143 | $errMsg = sprintf('Invalid prototype for %s', $requestedName); |
|
| 144 | throw new Exception\RuntimeException($errMsg); |
|
| 145 | } |
|
| 146 | return clone $this->prototype[$requestedName]; |
|
| 147 | } |
|
| 148 | ||
| 149 | $className = $this->getClassNameByInterface($requestedName); |
|
| 150 | if (false === $className) { |
|
| @@ 72-78 (lines=7) @@ | ||
| 69 | */ |
|
| 70 | public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) |
|
| 71 | { |
|
| 72 | if (array_key_exists($requestedName, $this->prototype)) { |
|
| 73 | if (!is_object($this->prototype[$requestedName])) { |
|
| 74 | $errMsg = sprintf('Invalid prototype for %s', $requestedName); |
|
| 75 | throw new Exception\RuntimeException($errMsg); |
|
| 76 | } |
|
| 77 | return clone $this->prototype[$requestedName]; |
|
| 78 | } |
|
| 79 | ||
| 80 | $appServiceLocator = $serviceLocator; |
|
| 81 | if ($serviceLocator instanceof AbstractPluginManager) { |
|