| 1 | <?php |
||
| 13 | final class ProxyContainer implements ContainerInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | private $mocks; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * ProxyContainer constructor. |
||
| 22 | */ |
||
| 23 | 12 | public function __construct() |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @param string $id |
||
| 30 | * @return ProxyInterface |
||
| 31 | * |
||
| 32 | * @throws InvalidIdentifierException |
||
| 33 | */ |
||
| 34 | 6 | public function get($id): ProxyInterface |
|
| 47 | |||
| 48 | /** |
||
| 49 | * @param string $id |
||
| 50 | * @return bool |
||
| 51 | */ |
||
| 52 | 11 | public function has($id): bool |
|
| 56 | |||
| 57 | /** |
||
| 58 | * @param string $id |
||
| 59 | * @param ProxyInterface $mock |
||
| 60 | */ |
||
| 61 | 8 | public function set(string $id, ProxyInterface $mock) |
|
| 65 | } |
||
| 66 |