class LdapClient implements LdapClientInterface

deprecated The LdapClient class will be removed in Symfony 4.0. You should use the Ldap class instead.

Methods

__construct($host = null, $port = 389, $version = 3, $useSsl = false, $useStartTls = false, $optReferrals = false, LdapInterface $ldap = null)

No description

bind(string $dn = null, string $password = null)

Return a connection bound to the ldap.

query(string $dn, string $query, array $options = array())

Queries a ldap server for entries matching the given criteria.

array|null
find(string $dn, string $query, mixed $filter = '*')

Find a username into ldap connection.

string
escape(string $subject, string $ignore = '', int $flags)

Escape a string for use in an LDAP filter or DN.

Details

at line line 27
__construct($host = null, $port = 389, $version = 3, $useSsl = false, $useStartTls = false, $optReferrals = false, LdapInterface $ldap = null)

Parameters

$host
$port
$version
$useSsl
$useStartTls
$optReferrals
LdapInterface $ldap

at line line 37
bind(string $dn = null, string $password = null)

Return a connection bound to the ldap.

Parameters

string $dn A LDAP dn
string $password A password

Exceptions

ConnectionException If dn / password could not be bound.

at line line 45
QueryInterface query(string $dn, string $query, array $options = array())

Queries a ldap server for entries matching the given criteria.

Parameters

string $dn
string $query
array $options

Return Value

QueryInterface

at line line 53
EntryManagerInterface getEntryManager()

Return Value

EntryManagerInterface

at line line 61
array|null find(string $dn, string $query, mixed $filter = '*')

Find a username into ldap connection.

Parameters

string $dn
string $query
mixed $filter

Return Value

array|null

at line line 102
string escape(string $subject, string $ignore = '', int $flags)

Escape a string for use in an LDAP filter or DN.

Parameters

string $subject
string $ignore
int $flags

Return Value

string