lib: Add Platform::hasLdapSupport() and Platform::hasDatabaseSupport()
refs #9683
This commit is contained in:
parent
358f1750fb
commit
d52bb7d92a
|
@ -318,6 +318,29 @@ class Platform
|
||||||
return false;
|
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
|
* Return whether it's possible to connect to a MSSQL database
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue