eZ/Publish/Core/Base/Container/ApiLoader/RepositoryFactory.php 1 location
|
@@ 111-119 (lines=9) @@
|
| 108 |
|
* |
| 109 |
|
* @return mixed |
| 110 |
|
*/ |
| 111 |
|
public function buildService(Repository $repository, $serviceName) |
| 112 |
|
{ |
| 113 |
|
$methodName = 'get' . $serviceName . 'Service'; |
| 114 |
|
if (!method_exists($repository, $methodName)) { |
| 115 |
|
throw new InvalidArgumentException($serviceName, 'No such service'); |
| 116 |
|
} |
| 117 |
|
|
| 118 |
|
return $repository->$methodName(); |
| 119 |
|
} |
| 120 |
|
} |
| 121 |
|
|
eZ/Bundle/EzPublishCoreBundle/ApiLoader/RepositoryFactory.php 1 location
|
@@ 136-144 (lines=9) @@
|
| 133 |
|
* |
| 134 |
|
* @return mixed |
| 135 |
|
*/ |
| 136 |
|
public function buildService(Repository $repository, $serviceName) |
| 137 |
|
{ |
| 138 |
|
$methodName = 'get' . $serviceName . 'Service'; |
| 139 |
|
if (!method_exists($repository, $methodName)) { |
| 140 |
|
throw new InvalidArgumentException($serviceName, 'No such service'); |
| 141 |
|
} |
| 142 |
|
|
| 143 |
|
return $repository->$methodName(); |
| 144 |
|
} |
| 145 |
|
} |
| 146 |
|
|