Object encapsulation of the resource(ldap link) native object
package | Ldap-Core |
---|
__call(string $method, array $args) : \Dreamscapes\Ldap\Core\ResultResource
string
Method name that was called
array
Arguments 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().
string
Optional ldap URI string of the ldap server
__toString() : string
string
Ldap 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 |
---|
string
The distinguished name of an LDAP entity
array
An array that specifies the information about the entry
\Dreamscapes\Ldap\Core\Ldap
bind(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 |
---|
string
Username for the bind
string
Password for the username
\Dreamscapes\Ldap\Core\Ldap
close()
compare(string $dn, string $attribute, string $value) : boolean
string
The distinguished name of an LDAP entity
string
The attribute name
string
The compared value
boolean
Returns 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 |
---|
string
Ldap URI string of the ldap server (i.e.
ldap://my.server.com:389)
\Dreamscapes\Ldap\Core\Ldap
delete(string $dn) : \Dreamscapes\Ldap\Core\Ldap
fluent | This method is part of a fluent interface and will return the same instance |
---|
string
The distinguished name of an LDAP entity
\Dreamscapes\Ldap\Core\Ldap
dnToUfn(string $dn) : string
string
The distinguished name of an LDAP entity
string
The user friendly nameerrToStr(integer $errno) : string
integer
The error number
string
The error message, as a stringerrno() : integer
integer
error() : string
string
escape(string $value, string $ignore= null
, integer $flags= null
) : string
$flags
may be one of: Ldap::ESCAPE_FILTER
, Ldap::ESCAPE_DN
since | PHP 5.6 |
---|
string
The value to escape
string
Characters to ignore when escaping
integer
The context the escaped string will be used in
string
Returns the escaped stringexplodeDn(string $dn, integer $withAttrib = 0
) : array
string
The distinguished name of an LDAP entity
integer
Used to request if the RDNs are returned with only values or their attributes as well
array
Returns an array of all DN componentsgetOption(integer $option) : mixed
integer
The option to be returned
mixed
getResource() : 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 |
---|
string
The distinguished name of an LDAP entity
array
Values to be added to the specified attributes
\Dreamscapes\Ldap\Core\Ldap
modDel(string $dn, array $entry) : \Dreamscapes\Ldap\Core\Ldap
fluent | This method is part of a fluent interface and will return the same instance |
---|
string
The distinguished name of an LDAP entity
array
Values to be deleted from the specified attributes
\Dreamscapes\Ldap\Core\Ldap
modDelete(string $dn, array $entry) : \Dreamscapes\Ldap\Core\Ldap
fluent | This method is part of a fluent interface and will return the same instance |
---|
string
The distinguished name of an LDAP entity
array
Values to be deleted from the specified attributes
\Dreamscapes\Ldap\Core\Ldap
modReplace(string $dn, array $entry) : \Dreamscapes\Ldap\Core\Ldap
fluent | This method is part of a fluent interface and will return the same instance |
---|
string
The distinguished name of an LDAP entity
array
Attributes and their values to be replaced
\Dreamscapes\Ldap\Core\Ldap
modify(string $dn, array $entry) : \Dreamscapes\Ldap\Core\Ldap
fluent | This method is part of a fluent interface and will return the same instance |
---|
string
The distinguished name of an LDAP entity
array
Attributes with their modified values
\Dreamscapes\Ldap\Core\Ldap
modifyBatch(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 |
string
The distinguished name of an LDAP entity
array
Modification specifications
\Dreamscapes\Ldap\Core\Ldap
pagedResult(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 |
---|
integer
The number of entries by page
boolean
Indicates whether the pagination is critical of not
string
An opaque structure sent by the server
\Dreamscapes\Ldap\Core\Ldap
read() :
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 |
---|
string
The distinguished name of an LDAP entity
string
The new RDN
string
The new parent/superior entry
boolean
If 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\Ldap
saslBind(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\Ldap
search(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()
string
The base DN for the directory
string
Ldap query filter (an empty filter is not allowed)
array
An array of the required attributes, e.g. array("mail", "sn",
"cn")
string
One of self::SCOPE_SUBTREE, self::SCOPE_ONELEVEL or self::SCOPE_BASE
boolean
Should be set to 1 if only attribute types are wanted
integer
Enables you to limit the count of entries fetched. Setting this to 0 means no limit
integer
Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
integer
Specifies how aliases should be handled during the search
\Dreamscapes\Ldap\Core\ResultResource
setOption(integer $option, mixed $newVal)
integer
An lDAP option constant
mixed
The 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\Ldap
setRebindProcedure(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\Ldap
startTls() : \Dreamscapes\Ldap\Core\Ldap
fluent | This method is part of a fluent interface and will return the same instance |
---|
\Dreamscapes\Ldap\Core\Ldap
unbind() : 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