getLdapType() 공개 메소드

Get the LDAP type set for this domain (ie. Active Directory, OpenLDAP, etc).
public getLdapType ( ) : string
리턴 string
예제 #1
0
 /**
  * Given the LDAP type, determine the BindStrategy to use.
  *
  * @param DomainConfiguration $config
  * @return ADBindUserStrategy|BindUserStrategy
  */
 public static function getInstance(DomainConfiguration $config)
 {
     if (LdapConnection::TYPE_AD == $config->getLdapType()) {
         return new ADBindUserStrategy($config);
     } else {
         return new self($config);
     }
 }
예제 #2
0
 function it_should_throw_a_SchemaParserException_when_the_schema_file_is_not_readable()
 {
     $fakePath = '/this/path/should/never/really/exist/I/would/hope';
     $this->beConstructedWith($fakePath);
     $domain = new DomainConfiguration('example.com');
     $domain->setLdapType('ad');
     $this->shouldThrow(new SchemaParserException('Cannot find schema for "ad" in "' . $fakePath . '"'))->duringParse($domain->getLdapType(), 'user');
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function getDiagnosticMessage()
 {
     return LastErrorStrategy::getInstance($this->config->getLdapType(), $this->connection)->getDiagnosticMessage();
 }