1 | <?php |
||
27 | class QueryManagerPooler extends ClientPooler |
||
28 | { |
||
29 | protected $listeners = []; |
||
30 | /** |
||
31 | * getPoolerType |
||
32 | * |
||
33 | * @see ClientPoolerInterface |
||
34 | */ |
||
35 | public function getPoolerType() |
||
36 | { |
||
37 | return 'query_manager'; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * getClientFromPool |
||
42 | * |
||
43 | * @see ClientPooler |
||
44 | * @return ClientInterface |
||
45 | */ |
||
46 | protected function getClientFromPool($client) |
||
47 | { |
||
48 | return $this |
||
49 | ->getSession() |
||
50 | ->getClient($this->getPoolerType(), trim($client, "\\")) |
||
51 | ; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * createClient |
||
56 | * |
||
57 | * @see ClientPooler |
||
58 | * @param string $client Client class name |
||
59 | * @throws FoundationException |
||
60 | * @return ClientInterface |
||
61 | */ |
||
62 | protected function createClient($client) |
||
74 | |||
75 | /** |
||
76 | * getPoolerType |
||
77 | * |
||
78 | * @see ClientPooler |
||
79 | * @param null|string $client |
||
80 | * @return \PommProject\Foundation\Client\Client |
||
81 | */ |
||
82 | public function getClient($client = null) |
||
90 | } |
||
91 |