update abstract pool

This commit is contained in:
prolic 2018-06-29 22:27:27 +08:00
parent f1f353039c
commit 953a75c5ff
No known key found for this signature in database
GPG Key ID: 29722F9F48E9DE59
1 changed files with 11 additions and 11 deletions

View File

@ -14,34 +14,34 @@ abstract class AbstractPool implements Pool
use CallableMaker;
/** @var Connector */
private $connector;
protected $connector;
/** @var ConnectionConfig */
private $config;
protected $config;
/** @var int */
private $maxConnections;
protected $maxConnections;
/** @var \SplQueue */
private $idle;
protected $idle;
/** @var \SplObjectStorage */
private $connections;
protected $connections;
/** @var bool */
private $closed = false;
protected $closed = false;
/** @var string */
private $timeoutWatcher;
protected $timeoutWatcher;
/** @var int */
private $idleTimeout = Pool::DEFAULT_IDLE_TIMEOUT;
protected $idleTimeout = Pool::DEFAULT_IDLE_TIMEOUT;
/** @var callable */
private $prepare;
protected $prepare;
/** @var int */
private $lastUsedAt;
protected $lastUsedAt;
/** @var Promise|null */
protected $promise;
@ -256,7 +256,7 @@ abstract class AbstractPool implements Pool
$this->idleTimeout = $timeout;
}
private function doPrepare(string $sql): \Generator
protected function doPrepare(string $sql): \Generator
{
/** @var Connection $connection */
$connection = yield from $this->pop();