getLdapType() public method

Get the LDAP type set for this domain (ie. Active Directory, OpenLDAP, etc).
public getLdapType ( ) : string
return string
Exemplo n.º 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);
     }
 }
Exemplo n.º 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');
 }
Exemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function getDiagnosticMessage()
 {
     return LastErrorStrategy::getInstance($this->config->getLdapType(), $this->connection)->getDiagnosticMessage();
 }