Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
17 | trait DAOPooling { |
||
18 | |||
19 | abstract public static function startDatabase(&$config, $offset = null); |
||
20 | protected static $pool; |
||
21 | |||
22 | /** |
||
23 | * gets a new DbConnection from pool |
||
24 | * |
||
25 | * @param string $offset |
||
26 | * @return mixed |
||
27 | */ |
||
28 | public static function pool($offset = 'default') { |
||
29 | if (! isset ( self::$db [$offset] )) { |
||
30 | self::startDatabase ( Startup::$config, $offset ); |
||
31 | } |
||
32 | return self::$db [$offset]->pool (); |
||
33 | } |
||
34 | |||
35 | public static function freePool($db) { |
||
37 | } |
||
38 | |||
39 | public static function go($asyncCallable, $offset = 'default') { |
||
49 |