lib: Add Platform::hasLdapSupport() and Platform::hasDatabaseSupport()

refs #9683
This commit is contained in:
Eric Lippmann 2015-09-07 16:43:41 +02:00
parent 358f1750fb
commit d52bb7d92a
1 changed files with 23 additions and 0 deletions

View File

@ -318,6 +318,29 @@ class Platform
return false;
}
/**
* Return whether it's possible to connect to a LDAP server
*
* Checks whether the ldap extension is loaded
*
* @return bool
*/
public static function hasLdapSupport()
{
return static::extensionLoaded('ldap');
}
/**
* Return whether it's possible to connect to any of the supported database servers
*
* @return bool
*/
public static function hasDatabaseSupport()
{
return static::hasMssqlSupport() || static::hasMysqlSupport() || static::hasOciSupport()
|| static::hasOracleSupport() || static::hasPostgresqlSupport();
}
/**
* Return whether it's possible to connect to a MSSQL database
*