1 | <?php |
||
14 | class AdapterPool |
||
15 | { |
||
16 | /** |
||
17 | * Pool of adapters |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | protected static $pool = []; |
||
22 | |||
23 | /** |
||
24 | * Construtor |
||
25 | */ |
||
26 | public function __construct() |
||
31 | |||
32 | /** |
||
33 | * @param $key |
||
34 | * @param Adapter $adapter |
||
35 | * @return $this |
||
36 | */ |
||
37 | public function add($key, Adapter $adapter) |
||
42 | |||
43 | /** |
||
44 | * @param $key |
||
45 | * @return $this |
||
46 | */ |
||
47 | public function remove($key) |
||
52 | |||
53 | /** |
||
54 | * @param $key |
||
55 | * @return Adapter |
||
56 | */ |
||
57 | public function get($key) |
||
61 | } |
||
62 |