PHP Class LdapTools\DomainConfiguration

Author: Chad Sikorra ([email protected])
Inheritance: use trait ConfigurationParseTrait
Afficher le fichier Open project: ldaptools/ldaptools Class Usage Examples

Protected Properties

Свойство Type Description
$config The configuration values.
$required These values must be set for the configuration to be valid.
$yamlConfigMap Maps YAML domain config values to their array key values.

Méthodes publiques

Méthode Description
__construct ( string $domainName = '' )
getBaseDn ( ) : string The base distinguished name in use.
getBindFormat ( ) : string Get the format a username should be bound as.
getConnectTimeout ( ) : integer Get the initial connection timeout value (seconds). This is how long it will wait when making the initial connection attempt to the LDAP server before it considers it unreachable/down.
getDomainName ( ) : string Get the fully qualified domain name.
getEncoding ( ) : string Get the encoding type to use.
getIdleReconnect ( ) : integer Get the elapsed time (in seconds) when an idle connection will attempt to reconnect to LDAP. A value of 0 means never.
getLazyBind ( ) : boolean Get whether or not the connection should bind on construction, or what until necessary.
getLdapOptions ( ) : array Get the array of LDAP_OPT_* constants and values that will be used when connecting.
getLdapType ( ) : string Get the LDAP type set for this domain (ie. Active Directory, OpenLDAP, etc).
getOperationInvoker ( ) : LdapTools\Operation\Invoker\LdapOperationInvokerInterface Get the operation invoker used in the LDAP connection.
getPageSize ( ) : integer Get the page size for paging operations.
getPassword ( ) : string Set the password to use when binding.
getPort ( ) : integer Get the port number to connect to.
getSchemaName ( ) : string Get the schema name set for this domain. If none is set explicitly, it will return the LDAP type name.
getServerSelection ( ) : mixed Get the server selection method to be used.
getServers ( ) : array Get the LDAP server names or IP addresses.
getUsePaging ( ) : boolean Get whether or not LDAP paging control should be used.
getUseSsl ( ) : boolean Whether SSL will be used for the connection or not.
getUseTls ( ) : boolean Get whether TLS will be used for the connection or not.
getUsername ( ) : string Get the username to use when binding.
load ( array $config ) Load a configuration from an array of values. The keys must be the same name as their YAML config names.
setBaseDn ( string $baseDn ) The base distinguished name to use (ie. "dc=example,dc=com").
setBindFormat ( string $bindFormat ) Set the format a username should be bound as.
setConnectTimeout ( $seconds ) Set the initial connection timeout value (seconds). This is how long it will wait when making the initial connection attempt to the LDAP server before it considers it unreachable/down.
setDomainName ( string $domainName ) Set the fully qualified domain name (ie. "example.com").
setEncoding ( string $encoding ) Set the encoding type to use.
setIdleReconnect ( integer $seconds ) Set the elapsed time (in seconds) when an idle connection will attempt to reconnect to LDAP. If you want to set it so an idle reconnect never happens, set the value to 0.
setLazyBind ( boolean $lazyBind ) Set whether or not the connection should bind on construction, or what until necessary.
setLdapOption ( string | integer $option, $value ) Set a specific LDAP_OPT_* constant and value.
setLdapOptions ( array $ldapOptions ) Set the LDAP_OPT_* constants to be used when connecting. This should be in the form of:
setLdapType ( string $ldapType ) Set the LDAP type for this domain.
setOperationInvoker ( LdapTools\Operation\Invoker\LdapOperationInvokerInterface $operationInvoker ) Set the operation invoker used in the LDAP connection.
setPageSize ( integer $pageSize ) Set the page size for paging operations.
setPassword ( string $password ) Set the password to use when binding.
setPort ( integer $port ) The port number to connect to.
setSchemaName ( string $schemaName ) Set the schema name to use for this domain.
setServerSelection ( $type ) Set the server selection method that should be used. Let the LdapServerPool take care of validation.
setServers ( array $servers ) Set the LDAP servers as an array of names or IP addresses.
setUsePaging ( boolean $paging ) Set whether or not LDAP paging control should be used.
setUseSsl ( boolean $useSsl ) Set whether SSL will be used for the connection or not.
setUseTls ( boolean $useTls ) Set whether TLS will be used for the connection or not.
setUsername ( string $username ) Set the username to use when binding.

Méthodes protégées

Méthode Description
isParsedConfigValid ( array $config ) : boolean Checks whether all required values for the configuration have been set.
validateInteger ( mixed $value, string $name ) : integer This is a helper since an integer could simply be passed as a string, which is still valid.

Method Details

__construct() public méthode

public __construct ( string $domainName = '' )
$domainName string

getBaseDn() public méthode

The base distinguished name in use.
public getBaseDn ( ) : string
Résultat string

getBindFormat() public méthode

Get the format a username should be bound as.
public getBindFormat ( ) : string
Résultat string

getConnectTimeout() public méthode

Get the initial connection timeout value (seconds). This is how long it will wait when making the initial connection attempt to the LDAP server before it considers it unreachable/down.
public getConnectTimeout ( ) : integer
Résultat integer

getDomainName() public méthode

Get the fully qualified domain name.
public getDomainName ( ) : string
Résultat string

getEncoding() public méthode

Get the encoding type to use.
public getEncoding ( ) : string
Résultat string

getIdleReconnect() public méthode

Get the elapsed time (in seconds) when an idle connection will attempt to reconnect to LDAP. A value of 0 means never.
public getIdleReconnect ( ) : integer
Résultat integer

getLazyBind() public méthode

Get whether or not the connection should bind on construction, or what until necessary.
public getLazyBind ( ) : boolean
Résultat boolean

getLdapOptions() public méthode

Get the array of LDAP_OPT_* constants and values that will be used when connecting.
public getLdapOptions ( ) : array
Résultat array

getLdapType() public méthode

Get the LDAP type set for this domain (ie. Active Directory, OpenLDAP, etc).
public getLdapType ( ) : string
Résultat string

getOperationInvoker() public méthode

Get the operation invoker used in the LDAP connection.
public getOperationInvoker ( ) : LdapTools\Operation\Invoker\LdapOperationInvokerInterface
Résultat LdapTools\Operation\Invoker\LdapOperationInvokerInterface

getPageSize() public méthode

Get the page size for paging operations.
public getPageSize ( ) : integer
Résultat integer

getPassword() public méthode

Set the password to use when binding.
public getPassword ( ) : string
Résultat string

getPort() public méthode

Get the port number to connect to.
public getPort ( ) : integer
Résultat integer

getSchemaName() public méthode

Get the schema name set for this domain. If none is set explicitly, it will return the LDAP type name.
public getSchemaName ( ) : string
Résultat string

getServerSelection() public méthode

Get the server selection method to be used.
public getServerSelection ( ) : mixed
Résultat mixed

getServers() public méthode

Get the LDAP server names or IP addresses.
public getServers ( ) : array
Résultat array

getUsePaging() public méthode

Get whether or not LDAP paging control should be used.
public getUsePaging ( ) : boolean
Résultat boolean

getUseSsl() public méthode

Whether SSL will be used for the connection or not.
public getUseSsl ( ) : boolean
Résultat boolean

getUseTls() public méthode

Get whether TLS will be used for the connection or not.
public getUseTls ( ) : boolean
Résultat boolean

getUsername() public méthode

Get the username to use when binding.
public getUsername ( ) : string
Résultat string

isParsedConfigValid() protected méthode

Checks whether all required values for the configuration have been set.
protected isParsedConfigValid ( array $config ) : boolean
$config array
Résultat boolean

load() public méthode

Load a configuration from an array of values. The keys must be the same name as their YAML config names.
public load ( array $config )
$config array

setBaseDn() public méthode

The base distinguished name to use (ie. "dc=example,dc=com").
public setBaseDn ( string $baseDn )
$baseDn string

setBindFormat() public méthode

Set the format a username should be bound as.
public setBindFormat ( string $bindFormat )
$bindFormat string

setConnectTimeout() public méthode

Set the initial connection timeout value (seconds). This is how long it will wait when making the initial connection attempt to the LDAP server before it considers it unreachable/down.
public setConnectTimeout ( $seconds )

setDomainName() public méthode

Set the fully qualified domain name (ie. "example.com").
public setDomainName ( string $domainName )
$domainName string

setEncoding() public méthode

Set the encoding type to use.
public setEncoding ( string $encoding )
$encoding string

setIdleReconnect() public méthode

Set the elapsed time (in seconds) when an idle connection will attempt to reconnect to LDAP. If you want to set it so an idle reconnect never happens, set the value to 0.
public setIdleReconnect ( integer $seconds )
$seconds integer

setLazyBind() public méthode

Set whether or not the connection should bind on construction, or what until necessary.
public setLazyBind ( boolean $lazyBind )
$lazyBind boolean

setLdapOption() public méthode

Set a specific LDAP_OPT_* constant and value.
public setLdapOption ( string | integer $option, $value )
$option string | integer
$value

setLdapOptions() public méthode

[ LDAP_OPT_* => value, ] ...where LDAP_OPT_* is either the int value of the constant, or the constant name in the form of a string.
public setLdapOptions ( array $ldapOptions )
$ldapOptions array

setLdapType() public méthode

Set the LDAP type for this domain.
public setLdapType ( string $ldapType )
$ldapType string The LDAP type.

setOperationInvoker() public méthode

Set the operation invoker used in the LDAP connection.
public setOperationInvoker ( LdapTools\Operation\Invoker\LdapOperationInvokerInterface $operationInvoker )
$operationInvoker LdapTools\Operation\Invoker\LdapOperationInvokerInterface

setPageSize() public méthode

Set the page size for paging operations.
public setPageSize ( integer $pageSize )
$pageSize integer

setPassword() public méthode

Set the password to use when binding.
public setPassword ( string $password )
$password string

setPort() public méthode

The port number to connect to.
public setPort ( integer $port )
$port integer

setSchemaName() public méthode

Set the schema name to use for this domain.
public setSchemaName ( string $schemaName )
$schemaName string

setServerSelection() public méthode

Set the server selection method that should be used. Let the LdapServerPool take care of validation.
public setServerSelection ( $type )
$type

setServers() public méthode

Set the LDAP servers as an array of names or IP addresses.
public setServers ( array $servers )
$servers array

setUsePaging() public méthode

Set whether or not LDAP paging control should be used.
public setUsePaging ( boolean $paging )
$paging boolean

setUseSsl() public méthode

Set whether SSL will be used for the connection or not.
public setUseSsl ( boolean $useSsl )
$useSsl boolean

setUseTls() public méthode

Set whether TLS will be used for the connection or not.
public setUseTls ( boolean $useTls )
$useTls boolean

setUsername() public méthode

Set the username to use when binding.
public setUsername ( string $username )
$username string

validateInteger() protected méthode

This is a helper since an integer could simply be passed as a string, which is still valid.
protected validateInteger ( mixed $value, string $name ) : integer
$value mixed
$name string
Résultat integer

Property Details

$config protected_oe property

The configuration values.
protected $config

$required protected_oe property

These values must be set for the configuration to be valid.
protected $required

$yamlConfigMap protected_oe property

Maps YAML domain config values to their array key values.
protected $yamlConfigMap