Adldap\Configuration\DomainConfiguration::get PHP Method

get() public method

Throws an exception if the specified option does not exist.
public get ( string $key ) : mixed
$key string
return mixed
    public function get($key)
    {
        if ($this->has($key)) {
            return $this->options[$key];
        }
        throw new ConfigurationException("Option {$key} does not exist.");
    }

Usage Example

Beispiel #1
0
 /**
  * Prepares the connection by setting configured parameters.
  *
  * @return void
  */
 protected function prepareConnection()
 {
     if ($this->configuration->get('use_ssl')) {
         $this->connection->ssl();
     } elseif ($this->configuration->get('use_tls')) {
         $this->connection->tls();
     }
     $this->connection->setOptions([LDAP_OPT_PROTOCOL_VERSION => $this->configuration->get('version'), LDAP_OPT_NETWORK_TIMEOUT => $this->configuration->get('timeout'), LDAP_OPT_REFERRALS => $this->configuration->get('follow_referrals')]);
 }
All Usage Examples Of Adldap\Configuration\DomainConfiguration::get