From bba1838c7d09dd30d04470cb7db07f7c994619bf Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 7 Sep 2015 16:32:24 +0200 Subject: [PATCH] lib: Add Platform::hasOracleSupport() refs #9683 --- library/Icinga/Application/Platform.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/library/Icinga/Application/Platform.php b/library/Icinga/Application/Platform.php index bb4aa9ca8..7c3f06671 100644 --- a/library/Icinga/Application/Platform.php +++ b/library/Icinga/Application/Platform.php @@ -342,6 +342,18 @@ class Platform return static::extensionLoaded('mysql') && static::classExists('Zend_Db_Adapter_Pdo_Mysql'); } + /** + * Return whether it's possible to connect to a Oracle database using PDO_OCI + * + * Checks whether the OCI PDO extension has been loaded and the Zend framework adapter for Oci is available + * + * @return bool + */ + public static function hasOracleSupport() + { + return static::extensionLoaded('pdo_oci') && static::classExists('Zend_Db_Adapter_Pdo_Mysql'); + } + /** * Return whether it's possible to connect to a PostgreSQL database *