public connect ([array $descriptor])
This method is automatically called in \Phalcon\Db\Adapter\Pdo constructor. Call it when you need to restore a database connection.
1 2 3 4 5 6 7 8 9 10 11 12 13 | use Phalcon\Db\Adapter\Pdo\Mysql; // Make a connection $connection = new Mysql([ 'host' => 'localhost' , 'username' => 'sigma' , 'password' => 'secret' , 'dbname' => 'blog' , 'port' => 3306, ]); // Reconnect $connection ->connect(); |
Please login to continue.