Object encapsulation of the resource(ldap link) native object
| package | Ldap-Core | 
|---|
__call(string $method, array $args) : \Dreamscapes\Ldap\Core\ResultResource
stringMethod name that was called
arrayArguments with which the method was called
\Dreamscapes\Ldap\Core\ResultResource__construct(string $ldapUrl = null) 
If $ldapUrl is provided, it will also open connection to the ldap server by calling self::connect().
stringOptional ldap URI string of the ldap server
__toString() : string
stringLdap server and port of this connection (i.e. example.com:389)add(string $dn, array $entry) : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
stringThe distinguished name of an LDAP entity
arrayAn array that specifies the information about the entry
\Dreamscapes\Ldap\Core\Ldapbind(string $bindDn= null, string $bindPassword= null) : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
stringUsername for the bind
stringPassword for the username
\Dreamscapes\Ldap\Core\Ldapclose()
compare(string $dn, string $attribute, string $value) : boolean
stringThe distinguished name of an LDAP entity
stringThe attribute name
stringThe compared value
booleanReturns TRUE if value matches otherwise returns FALSEconnect(string $ldapUrl) : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
stringLdap URI string of the ldap server (i.e.
                             ldap://my.server.com:389)\Dreamscapes\Ldap\Core\Ldapdelete(string $dn) : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
stringThe distinguished name of an LDAP entity
\Dreamscapes\Ldap\Core\LdapdnToUfn(string $dn) : string
stringThe distinguished name of an LDAP entity
stringThe user friendly nameerrToStr(integer $errno) : string
integerThe error number
stringThe error message, as a stringerrno() : integer
integererror() : string
stringescape(string $value, string $ignore= null, integer $flags= null) : string
$flags may be one of: Ldap::ESCAPE_FILTER, Ldap::ESCAPE_DN
| since | PHP 5.6 | 
|---|
stringThe value to escape
stringCharacters to ignore when escaping
integerThe context the escaped string will be used in
stringReturns the escaped stringexplodeDn(string $dn, integer $withAttrib = 0) : array
stringThe distinguished name of an LDAP entity
integerUsed to request if the RDNs are returned with only values or their attributes as well
arrayReturns an array of all DN componentsgetOption(integer $option) : mixed
integerThe option to be returned
mixedgetResource() : resource
resource(ldap link)list() :
| magic | |
|---|---|
| method | Perform search operation with SCOPE_ONELEVEL - see self::search() for argument list | 
modAdd(string $dn, array $entry) : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
stringThe distinguished name of an LDAP entity
arrayValues to be added to the specified attributes
\Dreamscapes\Ldap\Core\LdapmodDel(string $dn, array $entry) : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
stringThe distinguished name of an LDAP entity
arrayValues to be deleted from the specified attributes
\Dreamscapes\Ldap\Core\LdapmodDelete(string $dn, array $entry) : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
stringThe distinguished name of an LDAP entity
arrayValues to be deleted from the specified attributes
\Dreamscapes\Ldap\Core\LdapmodReplace(string $dn, array $entry) : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
stringThe distinguished name of an LDAP entity
arrayAttributes and their values to be replaced
\Dreamscapes\Ldap\Core\Ldapmodify(string $dn, array $entry) : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
stringThe distinguished name of an LDAP entity
arrayAttributes with their modified values
\Dreamscapes\Ldap\Core\LdapmodifyBatch(string $dn, array $entry) : \Dreamscapes\Ldap\Core\Ldap
Allows detailed specification of the modifications to perform.
Example:
$modifs = array(
array(
    "attrib"  => "telephoneNumber",
    "modtype" => Ldap::MODIFY_BATCH_ADD,
    "values"  => array("+420 777 111 222")
)
); $ldap->modifyBatch("cn=Robert Rossmann,dc=example,dc=com", $modifs);
| since | PHP ~5.4.26, >=5.5.10 | 
|---|---|
| see | |
| fluent | This method is part of a fluent interface and will return the same instance | 
stringThe distinguished name of an LDAP entity
arrayModification specifications
\Dreamscapes\Ldap\Core\LdappagedResult(integer $pageSize, boolean $isCritical= false, string $cookie= '') : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
integerThe number of entries by page
booleanIndicates whether the pagination is critical of not
stringAn opaque structure sent by the server
\Dreamscapes\Ldap\Core\Ldapread() :
| magic | |
|---|---|
| method | Perform search operation with SCOPE_BASE - see self::search() for argument list | 
rename(string $dn, string $newRdn, string $newParent, boolean $deleteOldRdn) : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
stringThe distinguished name of an LDAP entity
stringThe new RDN
stringThe new parent/superior entry
booleanIf TRUE the old RDN value(s) are removed, else the old RDN
                         value(s) are retained as non-distinguished values of the entry\Dreamscapes\Ldap\Core\LdapsaslBind(string $bindDn= null, string $bindPassword= null, string $saslMech= null, string $saslRealm= null, string $saslAuthcId= null, string $saslAuthzId= null, string $props= null) : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
string
string
string
string
string
string
string
\Dreamscapes\Ldap\Core\Ldapsearch(string $baseDn, string $filter, array $attributes, string $scope= self::SCOPE_SUBTREE, boolean $attrsOnly= false, integer $sizeLimit= 0, integer $timeLimit= 0, integer $deref= LDAP_DEREF_NEVER) : \Dreamscapes\Ldap\Core\ResultResource
The scope of the operation is controlled by the $scope parameter, which can be one of:
self::SCOPE_SUBTREE - equivalent of ldap_search() (default) self::SCOPE_ONELEVEL - equivalent of ldap_list() self::SCOPE_BASE - equivalent of ldap_read()
stringThe base DN for the directory
stringLdap query filter (an empty filter is not allowed)
arrayAn array of the required attributes, e.g. array("mail", "sn",
                         "cn")stringOne of self::SCOPE_SUBTREE, self::SCOPE_ONELEVEL or self::SCOPE_BASE
booleanShould be set to 1 if only attribute types are wanted
integerEnables you to limit the count of entries fetched. Setting this to 0 means no limit
integerSets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
integerSpecifies how aliases should be handled during the search
\Dreamscapes\Ldap\Core\ResultResourcesetOption(integer $option, mixed $newVal)
integerAn lDAP option constant
mixedThe new value for the option
setRebindProc(callable $callback) : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
callable
\Dreamscapes\Ldap\Core\LdapsetRebindProcedure(callable $callback) : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
callable
\Dreamscapes\Ldap\Core\LdapstartTls() : \Dreamscapes\Ldap\Core\Ldap
| fluent | This method is part of a fluent interface and will return the same instance | 
|---|
\Dreamscapes\Ldap\Core\Ldapunbind() : void
Once unbound the instance holding the link resource must not be used any further.
ACCOUNT_DISABLED = 533
ACCOUNT_EXPIRED = 701
ADMINLIMIT_EXCEEDED = 11
AFFECTS_MULTIPLE_DSAS = 71
ALIAS_DEREF_PROBLEM = 36
ALIAS_PROBLEM = 33
ALREADY_EXISTS = 68
AUTH_METHOD_NOT_SUPPORTED = 7
BUSY = 51
COMPARE_FALSE = 5
COMPARE_TRUE = 6
CONFIDENTIALITY_REQUIRED = 13
CONSTRAINT_VIOLATION = 19
ERROR_TOO_MANY_CONTEXT_IDS = 49
ESCAPE_DN = LDAP_ESCAPE_DN
ESCAPE_FILTER = LDAP_ESCAPE_FILTER
INAPPROPRIATE_AUTH = 48
INAPPROPRIATE_MATCHING = 18
INSUFFICIENT_ACCESS = 50
INVALID_CREDENTIALS = 49
INVALID_DN_SYNTAX = 34
INVALID_SYNTAX = 21
IS_LEAF = 35
LOOP_DETECT = 54
MODIFY_BATCH_ADD = LDAP_MODIFY_BATCH_ADD
MODIFY_BATCH_REMOVE = LDAP_MODIFY_BATCH_REMOVE
MODIFY_BATCH_REMOVE_ALL = LDAP_MODIFY_BATCH_REMOVE_ALL
MODIFY_BATCH_REPLACE = LDAP_MODIFY_BATCH_REPLACE
NAMING_VIOLATION = 64
NOT_ALLOWED_ON_NONLEAF = 66
NOT_ALLOWED_ON_RDN = 67
NOT_PERMITTED_TO_LOGON_AT_THIS_TIME = 530
NO_OBJECT_CLASS_MODS = 69
NO_SUCH_ATTRIBUTE = 16
NO_SUCH_OBJECT = 32
OBJECT_CLASS_VIOLATION = 65
OPERATIONS_ERROR = 1
OPT_CLIENT_CONTROLS = LDAP_OPT_CLIENT_CONTROLS
OPT_DEBUG_LEVEL = LDAP_OPT_DEBUG_LEVEL
OPT_DEREF = LDAP_OPT_DEREF
OPT_ERROR_NUMBER = LDAP_OPT_ERROR_NUMBER
OPT_ERROR_STRING = LDAP_OPT_ERROR_STRING
OPT_HOST_NAME = LDAP_OPT_HOST_NAME
OPT_MATCHED_DN = LDAP_OPT_MATCHED_DN
OPT_NETWORK_TIMEOUT = LDAP_OPT_NETWORK_TIMEOUT
OPT_PROTOCOL_VERSION = LDAP_OPT_PROTOCOL_VERSION
OPT_REFERRALS = LDAP_OPT_REFERRALS
OPT_RESTART = LDAP_OPT_RESTART
OPT_SERVER_CONTROLS = LDAP_OPT_SERVER_CONTROLS
OPT_SIZELIMIT = LDAP_OPT_SIZELIMIT
OPT_TIMELIMIT = LDAP_OPT_TIMELIMIT
OPT_X_SASL_AUTHCID = LDAP_OPT_X_SASL_AUTHCID
OPT_X_SASL_AUTHZID = LDAP_OPT_X_SASL_AUTHZID
OPT_X_SASL_MECH = LDAP_OPT_X_SASL_MECH
OPT_X_SASL_REALM = LDAP_OPT_X_SASL_REALM
OTHER = 80
PASSWORD_EXPIRED = 532
PROTOCOL_ERROR = 2
REFERRAL = 10
RESTRICTED_TO_SPECIFIC_MACHINES = 531
RESULTS_TOO_LARGE = 70
SASL_BIND_IN_PROGRESS = 14
SCOPE_BASE = 'ldap_read'
SCOPE_ONELEVEL = 'ldap_list'
SCOPE_SUBTREE = 'ldap_search'
SIZELIMIT_EXCEEDED = 4
STRONG_AUTH_REQUIRED = 8
SUCCESS = 0
TIMELIMIT_EXCEEDED = 3
TYPE_OR_VALUE_EXISTS = 20
UNAVAILABLE = 52
UNAVAILABLE_CRITICAL_EXTENSION = 12
UNDEFINED_TYPE = 17
UNWILLING_TO_PERFORM = 53
USER_ACCOUNT_LOCKED = 775
USER_MUST_RESET_PASSWORD = 773
USER_NOT_FOUND = 525