PHP 클래스 Scalr\Net\Ldap\LdapClient

부터: 06.06.2013
저자: Vitaliy Demidov ([email protected])
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Scalr\Net\Ldap\LdapConfig $config, string $username, string $password, $uid = null ) Constructor
__destruct ( ) Destructor
__sleep ( )
__wakeup ( )
clearLog ( ) Clears log
escape ( string $string ) : string Escapes query string
getConfig ( ) : Scalr\Net\Ldap\LdapConfig Gets LdapConfig
getEmail ( ) : string Gets the user email
getFullName ( ) : string Gets the user's full name
getGroupsDetails ( array $groups ) : array Retrieves information (for now only displayname/description) about groups from LDAP
getLdapError ( ) : string Gets last LDAP error
getLog ( ) : string Gets log
getUserGroups ( ) : array Gets the list of the groups in which specified user has memberships.
getUsername ( ) : string Gets username
isValidUser ( ) : boolean Checks is this user can be authenticated to LDAP
isValidUsername ( ) : boolean Checks if the username exists in the LDAP
realEscape ( string $string ) : string Escapes query string including asterisk and parentheses
unbind ( ) : boolean Unbinds LDAP connection

보호된 메소드들

메소드 설명
bindRdn ( string $username = null, string $password = null ) : boolean Binds to the LDAP directory with specified RDN and password.
getConnection ( ) : resource Gets LDAP connection link identifier
log ( string $format, mixed $args = null, mixed $_ = null ) Adds formatted string to log output

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( Scalr\Net\Ldap\LdapConfig $config, string $username, string $password, $uid = null )
$config Scalr\Net\Ldap\LdapConfig LDAP config
$username string LDAP rdn to check. It should look like [email protected]
$password string LDAP password for the specified user

__destruct() 공개 메소드

Destructor
public __destruct ( )

__sleep() 공개 메소드

public __sleep ( )

__wakeup() 공개 메소드

public __wakeup ( )

bindRdn() 보호된 메소드

Binds to the LDAP directory with specified RDN and password.
protected bindRdn ( string $username = null, string $password = null ) : boolean
$username string RDN
$password string Password
리턴 boolean Returns TRUE on success or FALSE otherwise

clearLog() 공개 메소드

Clears log
public clearLog ( )

escape() 공개 정적인 메소드

Escapes query string
public static escape ( string $string ) : string
$string string The query string
리턴 string

getConfig() 공개 메소드

Gets LdapConfig
public getConfig ( ) : Scalr\Net\Ldap\LdapConfig
리턴 Scalr\Net\Ldap\LdapConfig Returns LdapConfig instance

getConnection() 보호된 메소드

Gets LDAP connection link identifier
protected getConnection ( ) : resource
리턴 resource Returns LDAP connection link edentifier

getEmail() 공개 메소드

Gets the user email
public getEmail ( ) : string
리턴 string Returns user email address

getFullName() 공개 메소드

Gets the user's full name
public getFullName ( ) : string
리턴 string Returns user's full name

getGroupsDetails() 공개 메소드

Retrieves information (for now only displayname/description) about groups from LDAP
public getGroupsDetails ( array $groups ) : array
$groups array List of group ids
리턴 array Returns array of groups with their description

getLdapError() 공개 메소드

Gets last LDAP error
public getLdapError ( ) : string
리턴 string

getLog() 공개 메소드

Gets log
public getLog ( ) : string
리턴 string Returns the log output

getUserGroups() 공개 메소드

Gets the list of the groups in which specified user has memberships.
public getUserGroups ( ) : array
리턴 array Returns array of the sAMAccount name of the Groups

getUsername() 공개 메소드

Gets username
public getUsername ( ) : string
리턴 string Returns username which should look like [email protected]

isValidUser() 공개 메소드

Checks is this user can be authenticated to LDAP
public isValidUser ( ) : boolean
리턴 boolean Returns true on success or false otherwise

isValidUsername() 공개 메소드

Checks if the username exists in the LDAP
public isValidUsername ( ) : boolean
리턴 boolean Returns true on success or false if user does not exist

log() 보호된 메소드

Adds formatted string to log output
protected log ( string $format, mixed $args = null, mixed $_ = null )
$format string format string. see sprintf rules
$args mixed optional argument 1
$_ mixed optional argument list

realEscape() 공개 정적인 메소드

Escapes query string including asterisk and parentheses
public static realEscape ( string $string ) : string
$string string The query string
리턴 string

unbind() 공개 메소드

Unbinds LDAP connection
public unbind ( ) : boolean
리턴 boolean