1 | <?php |
||
20 | class ConnectionFactory |
||
21 | { |
||
22 | private $router; |
||
23 | |||
24 | private $realm; |
||
25 | |||
26 | private $session; |
||
27 | |||
28 | private function __construct(RouterInterface $router, RealmInterface $realm = null, SessionInterface $session = null) |
||
34 | |||
35 | /** |
||
36 | * @param RouterInterface $router |
||
37 | * |
||
38 | * @return ConnectionFactory |
||
39 | */ |
||
40 | public static function get(RouterInterface $router) |
||
44 | |||
45 | /** |
||
46 | * @param RealmInterface $realm |
||
47 | * |
||
48 | * @return ConnectionFactory |
||
49 | */ |
||
50 | public function select(RealmInterface $realm) |
||
54 | |||
55 | /** |
||
56 | * @param SessionInterface $session |
||
57 | * |
||
58 | * @return ConnectionFactory |
||
59 | */ |
||
60 | public function establish(SessionInterface $session) |
||
64 | |||
65 | /** |
||
66 | * @return Connection |
||
67 | */ |
||
68 | public function create() |
||
76 | } |
||
77 |