WhitePagesLdapConnection
in package
LDAP connection for white pages.
Table of Contents
- $bindDone : bool
- $profile : WhitePagesProfile
- $server : Connection|null
- __construct() : mixed
- Constructor
- __serialize() : array<string, WhitePagesProfile>
- Closes connection to the LDAP server before serialization.
- __unserialize() : void
- Restores the profile.
- bind() : bool
- Binds with the given credentials.
- getServer() : Connection|null
- Returns the LDAP handle.
- isBinded() : bool
- Returns if a bind was already done.
- openLdapConnection() : Connection|null
- Opens the LDAP connection and returns the handle. No bind is done.
Properties
$bindDone
private
bool
$bindDone
= false
$profile
private
WhitePagesProfile
$profile
$server
private
Connection|null
$server
= null
Methods
__construct()
Constructor
public
__construct(WhitePagesProfile $profile) : mixed
Parameters
- $profile : WhitePagesProfile
-
profile
Return values
mixed —__serialize()
Closes connection to the LDAP server before serialization.
public
__serialize() : array<string, WhitePagesProfile>
Return values
array<string, WhitePagesProfile> —data
__unserialize()
Restores the profile.
public
__unserialize(array<string, WhitePagesProfile> $data) : void
Parameters
- $data : array<string, WhitePagesProfile>
-
data
Return values
void —bind()
Binds with the given credentials.
public
bind(string $userDn, string $password) : bool
Parameters
- $userDn : string
-
user DN
- $password : string
-
password
Return values
bool —bind was successful
getServer()
Returns the LDAP handle.
public
getServer() : Connection|null
Return values
Connection|null —LDAP handle
isBinded()
Returns if a bind was already done.
public
isBinded() : bool
Return values
bool —bind was done
openLdapConnection()
Opens the LDAP connection and returns the handle. No bind is done.
private
openLdapConnection(WhitePagesProfile $profile) : Connection|null
Parameters
- $profile : WhitePagesProfile
-
profile
Return values
Connection|null —LDAP handle or null if the connection failed