Usage Scenarios
Zend_Ldap
Programmer's Reference Guide
Object oriented access to the LDAP tree using Zend_Ldap_Node
Tools
Creation and modification of DN strings
Using the filter API to create search filters
Example #1 Create simple LDAP filters
$f1
= Zend_Ldap_Filter::
equals
(
'name'
,
'value'
)
;
// (name=value)
$f2
= Zend_Ldap_Filter::
begins
(
'name'
,
'value'
)
;
// (name=value*)
$f3
= Zend_Ldap_Filter::
ends
(
'name'
,
'value'
)
;
// (name=*value)
$f4
= Zend_Ldap_Filter::
contains
(
'name'
,
'value'
)
;
// (name=*value*)
$f5
= Zend_Ldap_Filter::
greater
(
'name'
,
'value'
)
;
// (name>value)
$f6
= Zend_Ldap_Filter::
greaterOrEqual
(
'name'
,
'value'
)
;
// (name>=value)
$f7
= Zend_Ldap_Filter::
less
(
'name'
,
'value'
)
;
// (name<value)
$f8
= Zend_Ldap_Filter::
lessOrEqual
(
'name'
,
'value'
)
;
// (name<=value)
$f9
= Zend_Ldap_Filter::
approx
(
'name'
,
'value'
)
;
// (name~=value)
$f10
= Zend_Ldap_Filter::
any
(
'name'
)
;
// (name=*)
Example #2 Create more complex LDAP filters
$f1
= Zend_Ldap_Filter::
ends
(
'name'
,
'value'
)
->
negate
(
)
;
// (!(name=*value))
$f2
= Zend_Ldap_Filter::
equals
(
'name'
,
'value'
)
;
$f3
= Zend_Ldap_Filter::
begins
(
'name'
,
'value'
)
;
$f4
= Zend_Ldap_Filter::
ends
(
'name'
,
'value'
)
;
// (&(name=value)(name=value*)(name=*value))
$f5
= Zend_Ldap_Filter::
andFilter
(
$f2
,
$f3
,
$f4
)
;
// (|(name=value)(name=value*)(name=*value))
$f6
= Zend_Ldap_Filter::
orFilter
(
$f2
,
$f3
,
$f4
)
;
Modify LDAP entries using the Attribute API
Usage Scenarios
Zend_Ldap
Programmer's Reference Guide
Object oriented access to the LDAP tree using Zend_Ldap_Node
Programmer's Reference Guide
Programmer's Reference Guide
Zend Framework Reference
Zend_Ldap
Introduction
API overview
Usage Scenarios
Tools
Object oriented access to the LDAP tree using Zend_Ldap_Node
Getting information from the LDAP server
Serializing LDAP data to and from LDIF