| 1 | <?php |
||
| 12 | class ServiceManagerMock implements ContainerInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var array() |
||
| 16 | */ |
||
| 17 | private $services; |
||
| 18 | |||
| 19 | public function __construct(array $services = []) |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Retrieve a registered instance |
||
| 26 | * |
||
| 27 | * @param string $name |
||
| 28 | * @throws Exception\ServiceNotFoundException |
||
| 29 | * @return object|array |
||
| 30 | */ |
||
| 31 | public function get($name) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Check for a registered instance |
||
| 45 | * |
||
| 46 | * @param string|array $name |
||
| 47 | * @return bool |
||
| 48 | */ |
||
| 49 | public function has($name) |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Sets the service with defined key |
||
| 56 | * @param $key |
||
| 57 | * @param $service |
||
| 58 | * @return $this |
||
| 59 | */ |
||
| 60 | public function set($key, $service) |
||
| 65 | } |
||
| 66 |