checkLDAPExtension() public static method

If it is not loaded, it tries to load it manually using PHP's dl(). It knows both windows-dll and *nix-so.
public static checkLDAPExtension ( )
Exemplo n.º 1
0
Arquivo: Ldap.php Projeto: horde/horde
 /**
  * Constructor.
  *
  * @param Horde_Kolab_Server_Connection $connection The LDAP connection.
  * @param string                        $base_dn    The LDAP server base DN.
  * @param string                        $filter     A global filter to add
  *                                                  to all queries.
  */
 public function __construct(Horde_Kolab_Server_Connection_Interface $connection, $base_dn)
 {
     $this->_conn = $connection;
     $this->_base_dn = $base_dn;
     try {
         Horde_Ldap::checkLDAPExtension();
     } catch (Horde_Ldap_Exception $e) {
         throw new Horde_Kolab_Server_Exception($e->getMessage(), Horde_Kolab_Server_Exception::MISSING_LDAP_EXTENSION, $e);
     }
 }
Exemplo n.º 2
0
 public function setUp()
 {
     // Check extension.
     try {
         Horde_Ldap::checkLDAPExtension();
     } catch (Horde_Ldap_Exception $e) {
         $this->markTestSkipped($e->getMessage());
     }
     $config = $this->getConfig('LDAP_TEST_CONFIG');
     if (!$config) {
         $this->markTestSkipped('No configuration for LDAP tests.');
     }
     self::$ldapcfg = $config;
 }