| 1 | <?php |
||
| 11 | final class PingConnectionMiddleware implements Middleware |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var Connection |
||
| 15 | */ |
||
| 16 | private $connection; |
||
| 17 | |||
| 18 | public function __construct(Connection $connection) |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Reconnects to the database if the connection is expired. |
||
| 25 | * |
||
| 26 | * @param object $command |
||
| 27 | * @param callable $next |
||
| 28 | * @return mixed |
||
| 29 | */ |
||
| 30 | public function execute($command, callable $next) |
||
| 39 | } |
||
| 40 |