1234567891011121314151617181920212223242526 |
- <?php
- class CoMysqliPool extends CoRefPool
- {
- const max_clients = 100;
- private static $stInstance = null;
- public static function instance()
- {
- if (self::$stInstance == null) {
- self::$stInstance = new CoMysqliPool();
- }
- return self::$stInstance;
- }
- private function __construct()
- {
- parent::__construct(self::max_clients);
- }
- public function create_client()
- {
- return ['master' => null, 'slave' => null];
- }
- }
|