1 | <?php |
||
15 | class DriverFactoryRegistry |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * Driver factory registry. |
||
20 | * |
||
21 | * @var IMinkDriverFactory[] |
||
22 | */ |
||
23 | private $_registry = array(); |
||
24 | |||
25 | /** |
||
26 | * Registers Mink driver factory. |
||
27 | * |
||
28 | * @param IMinkDriverFactory $driver_factory Driver factory. |
||
29 | * |
||
30 | * @return void |
||
31 | * @throws \LogicException When driver factory is already registered. |
||
32 | */ |
||
33 | 12 | public function add(IMinkDriverFactory $driver_factory) |
|
43 | |||
44 | /** |
||
45 | * Looks up driver factory by name of the driver it can create. |
||
46 | * |
||
47 | * @param string $driver_name Driver name. |
||
48 | * |
||
49 | * @return IMinkDriverFactory |
||
50 | * @throws \OutOfBoundsException When driver not found. |
||
51 | */ |
||
52 | 15 | public function get($driver_name) |
|
60 | |||
61 | } |
||
62 |