From 41ebb49c58cad0aa4c39014b51de74359e604c3f Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 18 Aug 2015 16:18:25 +0200 Subject: [PATCH] DbTool: Add method isConnected() refs #9460 --- modules/setup/library/Setup/Utils/DbTool.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/setup/library/Setup/Utils/DbTool.php b/modules/setup/library/Setup/Utils/DbTool.php index bf3465458..9e8f725db 100644 --- a/modules/setup/library/Setup/Utils/DbTool.php +++ b/modules/setup/library/Setup/Utils/DbTool.php @@ -204,6 +204,16 @@ class DbTool } } + /** + * Return whether a connection with the server has been established + * + * @return bool + */ + public function isConnected() + { + return $this->pdoConn !== null; + } + /** * Establish a connection with the database or just the server by omitting the database name *