本文整理汇总了PHP中Zend\Ldap\Ldap::getOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Ldap::getOptions方法的具体用法?PHP Ldap::getOptions怎么用?PHP Ldap::getOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\Ldap\Ldap
的用法示例。
在下文中一共展示了Ldap::getOptions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testConfigObject
public function testConfigObject()
{
$config = new Config\Config(array('host' => TESTS_ZEND_LDAP_HOST, 'username' => TESTS_ZEND_LDAP_USERNAME, 'password' => TESTS_ZEND_LDAP_PASSWORD, 'baseDn' => TESTS_ZEND_LDAP_BASE_DN));
$ldap = new Ldap\Ldap($config);
$this->assertEquals(array('host' => TESTS_ZEND_LDAP_HOST, 'port' => 0, 'useSsl' => false, 'username' => TESTS_ZEND_LDAP_USERNAME, 'password' => TESTS_ZEND_LDAP_PASSWORD, 'bindRequiresDn' => false, 'baseDn' => TESTS_ZEND_LDAP_BASE_DN, 'accountCanonicalForm' => null, 'accountDomainName' => null, 'accountDomainNameShort' => null, 'accountFilterFormat' => null, 'allowEmptyPassword' => false, 'useStartTls' => false, 'optReferrals' => false, 'tryUsernameSplit' => true, 'networkTimeout' => null), $ldap->getOptions());
}
示例2: setLdap
/**
* Set an Ldap connection
*
* @param Zend_Ldap $ldap An existing Ldap object
* @return Zend\Authentication\Adapter\Ldap Provides a fluent interface
*/
public function setLdap(\Zend\Ldap\Ldap $ldap)
{
$this->_ldap = $ldap;
$this->setOptions(array($ldap->getOptions()));
return $this;
}
示例3: setLdap
/**
* Set an Ldap connection
*
* @param ZendLdap\Ldap $ldap An existing Ldap object
* @return Ldap Provides a fluent interface
*/
public function setLdap(ZendLdap\Ldap $ldap)
{
$this->ldap = $ldap;
$this->setOptions([$ldap->getOptions()]);
return $this;
}