View Source

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFDEV:Zend Proposal Zone Template}
{composition-setup}

{zone-data:component-name}
Zend_Ldap - Extended support(Zend_Ldap_Ext)
{zone-data}

{zone-data:proposer-list}
[Stefan Gehrig|mailto:gehrig@ishd.de]
Liasion: [~ralph]
{zone-data}

{zone-data:revision}
0.1 - 29 March 2008: Opened proposal.
0.1.1 - 3 April 2008: Changed layout to use decks.
0.2 - 13 April 2008: Added Zend_Ldap_Ext::count() method
0.3 - 17 April 2008: Completely reworked the class skeletons to match the current version, I'm working on.
0.4 - 5 July 2008: Changed respository location
0.5 - 10 August 2008: Reworked the proposal as it was fairly outdated
0.6 - 27 November 2008: Updated proposal to match Zend requirements (merging of Zend_Ldap_Ext into Zend_Ldap)
0.7 - 4 December 2008: Updated proposal (includes new features like LDIF support, schema browsing, etc.)
{zone-data}

{zone-data:overview}
The existing Zend_Ldap component currently just responds to authentication use cases in all their varieties. There is no posibility to query a LDAP directory service in a unified and consistent way. The current component also lacks core CRUD (Create, Retrieve, Update and Delete) functionality - operations that are crucial to for example database abstraction layers.
This proposals tries to resolve these deficiencies in that it provides a simple two-ply object oriented model to connect to, query and perfom CRUD operations on an LDAP server. The first layer is a wrapper around the ext/ldap functions, spiced up with extended functionality such as copying and moving (renaming in a LDAP context) nodes and subtrees.
The second layer (Zend_Ldap_Node) provides an active-record-like interface to LDAP entries and stresses the tree-structure of LDAP data in providing (recursive) tree traversal methods.
To simplify the usage of the unfamiliar LDAP filter syntax this components proposes an object oriented approach to LDAP filter string generation, which can loosely be compared to Zend_Db_Select.
Usefull helper classes for creating and modifying LDAP DNs and converting attribute values complete this component.
It is important to note, that this proposal is a complete replacement for the current Zend_Ldap component and *does not* break backwards-compatibility.
{zone-data}

{zone-data:references}
* [PHP Manual LDAP Functions|http://de.php.net/manual/en/ref.ldap.php]
* [Zend Framework Programmer's Reference Guide - Chapter 21. Zend_Ldap|http://framework.zend.com/manual/en/zend.ldap.html]
* [RFC2253 - Lightweight Directory Access Protocol (v3): UTF-8 Str|http://www.faqs.org/rfcs/rfc2253.html]
* [RFC2254 - The String Representation of LDAP Search Filters|http://www.faqs.org/rfcs/rfc2254.html]
{zone-data}

{zone-data:requirements}
* This component *will* replace Zend_Ldap.
* This component *will not* break backwards-compatibility with the existing Zend_Ldap.
* This component *will* provide generic CRUD functions (getEntry(), add(), update() and delete()).
* This component *will* provide generic search functions (search()).
* This component *will* abstracts a LDAP search result resource into a collection class to abstract the cumbersome use of ext/ldap to retrieve attributes in a common format.
* This component *will* provide an object oriented API to LDAP entries that factors in the tree-structure of LDAP.
* This component *will* provide an active-record-like interface to single LDAP entries.
* This component *will* provide an API to manipulate DN strings.
* This component *will* allow for the creation of LDAP filters in an object oriented way.
* This component *will* assist the user in populating and reading LDAP entry arrays.
* This component *will* detect LDAP boolean values ('TRUE' and 'FALSE') and convert them to PHP booleans.
* This component *will* provide a method to populate an LDAP entry array regardless of the PHP variable type.
* This component *will* handle file resources transparently so that it's possible to add the contents of a file to an LDAP attribute.
* This component *will* provide a method to set a LDAP userPassword attribute with SHA1 or MD5 hashed passwords.
{zone-data}

{zone-data:dependencies}
* PHP ext/ldap
{zone-data}

{zone-data:operation}
This replacement Zend_Ldap component builds on the foundations layed out by the current Zend_Ldap component and extends its capabilities with methods to query an LDAP directory service and to perform creation, updating, retrieval and deletion operations on the LDAP server. It therefore wraps ext/ldap function calls in an object-oriented interface and unifies result handling. On this layer LDAP data is represented in an array format to allow for round-trips of the data. Helper functions will allow developers to handle LDAP data in a common way; this includes conversion of LDAP date/time attributes, LDAP boolean attributes and the creation of LDAP password attributes. These methods will also help the developer to build consistent LDAP data arrays for use with the different data modification methods of Zend_Ldap and will allow the creation of LDAP DN strings (a lot of these functions are inspired by PEAR::Package::Net_LDAP2).
Query results are encapsulated in Zend_Ldap_Collection which acts as an interface to the LDAP resultset. Zend_Ldap_Collection implemets the common PHP SPL interfaces Iterator and Countable and includes a LDAP entry cache to speed up multiple iterations.
On top of these core functionality Zend_Ldap_Node provides an active-record-like interface to single LDAP entries. Through the use of the SPL RecursiveIterator interface developers can traverse complete LDAP trees recursively with a single foreach()-loop. Zend_Ldap_Node can be extended by deleopers and form a basis for a LDAP data model.
Building LDAP filter strings is unfamiliar to SQL-accustomed developers and not always very intuitive with all its parentheses. Zend_Ldap_Filter proposes an object oriented approach to filter creation which is also inspired by PEAR::Package::Net_LDAP2. With automatic value escaping LDAP filter string creation could be a no-brainer this way.
{zone-data}

{zone-data:milestones}
* Milestone 1: \[DONE\] Write initial proposal
* Milestone 2: \[CURRENT\] Review by community
* Milestone 3: \[DONE\] Checked in at http://zend-ldap.googlecode.com/svn/trunk/
* Milestone 4: \[DONE\] Review by Zend
* Milestone 5: Component incubated
* Milestone 6: \[DONE\] Write unit tests
* Milestone 7: Write documentation
* Milestone 8: Component cored
{zone-data}

{zone-data:class-list}
* Zend_Ldap
* Zend_Ldap_Attribute
* Zend_Ldap_Collection
* Zend_Ldap_Converter
* Zend_Ldap_Dn
* Zend_Ldap_Exception
* Zend_Ldap_Filter
* Zend_Ldap_Filter_Abstract
* Zend_Ldap_Filter_And
* Zend_Ldap_Filter_Exception
* Zend_Ldap_Filter_Logical
* Zend_Ldap_Filter_Mask
* Zend_Ldap_Filter_Not
* Zend_Ldap_Filter_Or
* Zend_Ldap_Filter_String
* Zend_Ldap_Node
* Zend_Ldap_Node_ChildrenIterator
* Zend_Ldap_Node_Collection
* Zend_Ldap_QueryResult
{zone-data}

{zone-data:use-cases}
||Core classes||
{deck:id=UC Core classes}
{card:label=UC-01}
Search a LDAP diretory service
{code}
$options = array(/* same as in Zend_Ldap */);
$ldap=new Zend_Ldap($options);
$ldap->bind();
$result=$ldap->search('(objectclass=*)', 'ou=People,dc=my,dc=local', Zend_Ldap_Ext::SEARCH_SCOPE_ONE);
foreach ($result as $item)
{
echo $item["dn"] . ': ' . $item['cn'][0] . PHP_EOL;
}
{code}
{card}
{card:label=UC-02}
Retrieve a single entry by its DN
{code}
$options = array(/* same as in Zend_Ldap */);
$ldap=new Zend_Ldap($options);
$ldap->bind();
$hm=$ldap->getEntry('cn=Hugo Müller,ou=People,dc=my,dc=local');
/*
$hm is an array of the following structure
array(
'dn' => 'cn=Hugo Müller,ou=People,dc=my,dc=local',
'cn' => array('Hugo Müller'),
'sn' => array('Müller'),
'objectclass' => array('inetOrgPerson', 'top'),
...
)
*/
{code}
{card}
{card:label=UC-03}
Add a new entry to LDAP directory
{code}
$options = array(/* same as in Zend_Ldap */);
$ldap=new Zend_Ldap($options);
$ldap->bind();
$entry=array();
Zend_Ldap_Attribute::setAttribute($entry, 'cn', 'Hans Meier');
Zend_Ldap_Attribute::setAttribute($entry, 'sn', 'Meier');
Zend_Ldap_Attribute::setAttribute($entry, 'objectClass', 'inetOrgPerson');
$ldap->add('cn=Hans Meier,ou=People,dc=my,dc=local', $entry);
{code}
{card}
{card:label=UC-04}
Delete an entry from LDAP directory
{code}
$options = array(/* same as in Zend_Ldap */);
$ldap=new Zend_Ldap($options);
$ldap->bind();
$ldap->delete('cn=Hans Meier,ou=People,dc=my,dc=local');
{code}
{card}
{card:label=UC-05}
Load an entry from LDAP directory, change attribute, set password
and update to LDAP directory
{code}
$options = array(/* same as in Zend_Ldap */);
$ldap=new Zend_Ldap($options);
$ldap->bind();
$hm=$ldap->getEntry('cn=Hugo Müller,ou=People,dc=my,dc=local');
Zend_Ldap_Attribute::setAttribute($hm, 'mail', 'mueller@my.local');
Zend_Ldap_Attribute::setPassword($hm, 'newPa$$w0rd', Zend_Ldap_Attribute::PASSWORD_HASH_SHA1);
$ldap->update('cn=Hugo Müller,ou=People,dc=my,dc=local', $hm);
{code}
{card}
{card:label=UC-06}
Check for the existence of a given DN
{code}
$options = array(/* same as in Zend_Ldap */);
$ldap=new Zend_Ldap($options);
$ldap->bind();
$isThere=$ldap->exists('cn=Hugo Müller,ou=People,dc=my,dc=local');
{code}
{card}
{card:label=UC-07}
Count children of a given DN
{code}
$options = array(/* same as in Zend_Ldap */);
$ldap=new Zend_Ldap($options);
$ldap->bind();
$childrenCount=$ldap->countChildren('cn=Hugo Müller,ou=People,dc=my,dc=local');
{code}
{card}
{card:label=UC-08}
Copy a LDAP entry recursively with all its descendants.
{code}
$options = array(/* same as in Zend_Ldap */);
$ldap=new Zend_Ldap($options);
$ldap->bind();
$ldap->copy('cn=Hugo Müller,ou=People,dc=my,dc=local', 'cn=Hans Meier,ou=People,dc=my,dc=local', true);
{code}
{card}
{card:label=UC-09}
Move a LDAP entry recursively with all its descendants to a different subtree.
{code}
$options = array(/* same as in Zend_Ldap */);
$ldap=new Zend_Ldap($options);
$ldap->bind();
$ldap->moveToSubtree('cn=Hugo Müller,ou=People,dc=my,dc=local', 'ou=Dismissed,dc=my,dc=local', true);
{code}
{card}
{deck}

||Filter subpackage||
{deck:id=UC Filter subpackage}
{card:label=UC-10}
Create simple LDAP filters
{code}
$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=*)
{code}
{card}
{card:label=UC-11}
Create more complex LDAP filters
{code}
$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');
$f5=Zend_Ldap_Filter::andFilter($f2, $f3, $f4); // (&(name=value)(name=value*)(name=*value))
$f6=Zend_Ldap_Filter::orFilter($f2, $f3, $f4); // (|(name=value)(name=value*)(name=*value))
{code}
{card}
{deck}

||Node subpackage||
{deck:id=UC Node subpackage}
{card:label=UC-12}
Traverse LDAP tree recursively
{code}
$options = array(/* same as in Zend_Ldap */);
$ldap=new Zend_Ldap($options);
$ldap->bind();
$ri=new RecursiveIteratorIterator($ldap->getBaseNode(), RecursiveIteratorIterator::SELF_FIRST);
foreach ($ri as $rdn => $n) {
var_dump($n);
}
{code}
{card}
{deck}
{zone-data}

{zone-data:skeletons}
||Core classes||
{deck:id=Core classes 1}
{card:label=Zend_Ldap}
{code}
/**
* @category Zend
* @package Zend_Ldap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap
{
const SEARCH_SCOPE_SUB = 1;
const SEARCH_SCOPE_ONE = 2;
const SEARCH_SCOPE_BASE = 3;
const ACCTNAME_FORM_DN = 1;
const ACCTNAME_FORM_USERNAME = 2;
const ACCTNAME_FORM_BACKSLASH = 3;
const ACCTNAME_FORM_PRINCIPAL = 4;
/**
* @deprecated will be removed
* @param string $str The string to escape.
* @return string The escaped string
*/
public static function filterEscape($str) { }

/**
* @deprecated will be removed
* @param string $dn The DN to parse
* @param array $keys An optional array to receive DN keys (e.g. CN, OU, DC, ...)
* @param array $vals An optional array to receive DN values
* @return bool True if the DN was successfully parsed or false if the string is not a valid DN.
*/
public static function explodeDn($dn, array &$keys = null, array &$vals = null) { }

/**
* Constructor.
*
* @param array|Zend_Config $options Options used in connecting, binding, etc.
* @return void
*/
public function __construct($options = array()) { }

/**
* Destructor.
*
* @return void
*/
public function __destruct() { }

/**
* Return the LDAP error number of the last LDAP command
*
* @return int
*/
public function getLastErrorCode() { }

/**
* Return the LDAP error message of the last LDAP command
*
* @param int $errorCode
* @param array $errorMessages
* @return string
*/
public function getLastError(&$errorCode = null, array &$errorMessages = null) { }

/**
* Sets the options used in connecting, binding, etc.
*
* Valid option keys:
* host
* port
* useSsl
* username
* password
* bindRequiresDn
* baseDn
* accountCanonicalForm
* accountDomainName
* accountDomainNameShort
* accountFilterFormat
* allowEmptyPassword
* useStartTls
* optRefferals
*
* @param array|Zend_Config $options Options used in connecting, binding, etc.
* @return Zend_Ldap Provides a fluent interface
* @throws Zend_Ldap_Exception
*/
public function setOptions($options) { }

/**
* @return array The current options.
*/
public function getOptions() { }

/**
* @return resource The raw LDAP extension resource.
*/
public function getResource() { }

/**
* @return string The hostname of the LDAP server being used to authenticate accounts
*/
protected function _getHost() { }

/**
* @return int The port of the LDAP server or 0 to indicate that no port value is set
*/
protected function _getPort() { }

/**
* @return string The default acctname for binding
*/
protected function _getUsername() { }

/**
* @return string The default password for binding
*/
protected function _getPassword() { }

/**
* @return boolean The default SSL / TLS encrypted transport control
*/
protected function _getUseSsl() { }

/**
* Gets the base DN under which objects of interest are located
*
* @return string
*/
public function getBaseDn() { }

/**
* @return string Either ACCTNAME_FORM_BACKSLASH, ACCTNAME_FORM_PRINCIPAL or
* ACCTNAME_FORM_USERNAME indicating the form usernames should be canonicalized to.
*/
protected function _getAccountCanonicalForm() { }

/**
* @return string A format string for building an LDAP search filter to match an account
*/
protected function _getAccountFilterFormat() { }

/**
* @return string The LDAP search filter for matching directory accounts
*/
protected function _getAccountFilter($acctname) { }

/**
* @param string $name The name to split
* @param string $dname The resulting domain name (this is an out parameter)
* @param string $aname The resulting account name (this is an out parameter)
*/
protected function _splitName($name, &$dname, &$aname) { }

/**
* @param string $acctname The name of the account
* @return string The DN of the specified account
* @throws Zend_Ldap_Exception
*/
protected function _getAccountDn($acctname) { }

/**
* @param string $dname The domain name to check
* @return bool
*/
protected function _isPossibleAuthority($dname) { }

/**
* @param string $acctname The name to canonicalize
* @param int $type The desired form of canonicalization
* @return string The canonicalized name in the desired form
* @throws Zend_Ldap_Exception
*/
public function getCanonicalAccountName($acctname, $form = 0) { }

/**
* @param array $attrs An array of names of desired attributes
* @return array An array of the attributes representing the account
* @throws Zend_Ldap_Exception
*/
private function _getAccount($acctname, array $attrs = null) { }

/**
* @return Zend_Ldap Provides a fluent interface
*/
public function disconnect() { }

/**
* @param string $host The hostname of the LDAP server to connect to
* @param int $port The port number of the LDAP server to connect to
* @return Zend_Ldap Provides a fluent interface
* @throws Zend_Ldap_Exception
*/
public function connect($host = null, $port = 0, $useSsl = false) { }

/**
* @param string $username The username for authenticating the bind
* @param string $password The password for authenticating the bind
* @return Zend_Ldap Provides a fluent interface
* @throws Zend_Ldap_Exception
*/
public function bind($username = null, $password = null) { }

/**
* A global LDAP search routine for finding information.
*
* @param string|Zend_Ldap_Filter_Abstract $filter
* @param string|Zend_Ldap_Dn $basedn
* @param integer $scope
* @param array $attributes
* @param string $sort
* @param string $collectionClass
* @return Zend_Ldap_Collection
* @throws Zend_Ldap_Exception
*/
public function search($filter, $basedn = null, $scope = self::SEARCH_SCOPE_SUB,
array $attributes = array(), $sort = null, $collectionClass = null) { }

/**
* Count items found by given filter.
*
* @param string|Zend_Ldap_Filter_Abstract $filter
* @param string|Zend_Ldap_Dn $basedn
* @param integer $scope
* @return integer
* @throws Zend_Ldap_Exception
*/
public function count($filter, $basedn = null, $scope = self::SEARCH_SCOPE_SUB) { }

/**
* Count children for a given DN.
*
* @param string|Zend_Ldap_Dn $dn
* @return integer
* @throws Zend_Ldap_Exception
*/
public function countChildren($dn) { }

/**
* Check if a given DN exists.
*
* @param string|Zend_Ldap_Dn $dn
* @return boolean
* @throws Zend_Ldap_Exception
*/
public function exists($dn) { }

/**
* Search LDAP registry for entries matching filter and optional attributes
*
* @param string|Zend_Ldap_Filter_Abstract $filter
* @param string|Zend_Ldap_Dn $basedn
* @param integer $scope
* @param array $attributes
* @param string $sort
* @return array
* @throws Zend_Ldap_Exception
*/
public function searchEntries($filter, $basedn = null, $scope = self::SEARCH_SCOPE_SUB,
array $attributes = array(), $sort = null) { }

/**
* Get LDAP entry by DN
*
* @param string|Zend_Ldap_Dn $dn
* @param array $attributes
* @param boolean $throwOnNotFound
* @return array
* @throws Zend_Ldap_Exception
*/
public function getEntry($dn, array $attributes = array(), $throwOnNotFound = false) { }

/**
* Prepares an ldap data entry array for insert/update operation
*
* @param array $entry
* @return void
* @throws InvalidArgumentException
*/
public static function prepareLdapEntryArray(array &$entry) { }

/**
* Add new information to the LDAP repository
*
* @param string|Zend_Ldap_Dn $dn
* @param array $entry
* @return Zend_Ldap *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function add($dn, array $entry) { }

/**
* Update LDAP registry
*
* @param string|Zend_Ldap_Dn $dn
* @param array $entry
* @return Zend_Ldap *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function update($dn, array $entry) { }

/**
* Save entry to LDAP registry.
*
* Internally decides if entry will be updated to added by calling
* {@link exists()}.
*
* @param string|Zend_Ldap_Dn $dn
* @param array $entry
* @return Zend_Ldap *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function save($dn, array $entry) { }

/**
* Delete an LDAP entry
*
* @param string|Zend_Ldap_Dn $dn
* @param boolean $recursively
* @return Zend_Ldap *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function delete($dn, $recursively = false) { }

/**
* Moves a LDAP entry from one DN to another subtree.
*
* @param string|Zend_Ldap_Dn $from
* @param string|Zend_Ldap_Dn $to
* @param boolean $recursively
* @param boolean $alwaysEmulate
* @return Zend_Ldap *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function moveToSubtree($from, $to, $recursively = false, $alwaysEmulate = false) { }

/**
* Moves a LDAP entry from one DN to another DN.
*
* This is an alias for {@link rename()}
*
* @param string|Zend_Ldap_Dn $from
* @param string|Zend_Ldap_Dn $to
* @param boolean $recursively
* @param boolean $alwaysEmulate
* @return Zend_Ldap *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function move($from, $to, $recursively = false, $alwaysEmulate = false) { }

/**
* Renames a LDAP entry from one DN to another DN.
*
* This method implicitely moves the entry to another location within the tree.
*
* @param string|Zend_Ldap_Dn $from
* @param string|Zend_Ldap_Dn $to
* @param boolean $recursively
* @param boolean $alwaysEmulate
* @return Zend_Ldap *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function rename($from, $to, $recursively = false, $alwaysEmulate = false) { }

/**
* Copies a LDAP entry from one DN to another subtree.
*
* @param string|Zend_Ldap_Dn $from
* @param string|Zend_Ldap_Dn $to
* @param boolean $recursively
* @return Zend_Ldap *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function copyToSubtree($from, $to, $recursively = false) { }

/**
* Copies a LDAP entry from one DN to another DN.
*
* @param string|Zend_Ldap_Dn $from
* @param string|Zend_Ldap_Dn $to
* @param boolean $recursively
* @return Zend_Ldap *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function copy($from, $to, $recursively = false) { }

/**
* Returns the specified DN as a Zend_Ldap_Node
*
* @param string|Zend_Ldap_Dn $dn
* @return Zend_Ldap_Node
* @throws Zend_Ldap_Exception
*/
public function getNode($dn) { }

/**
* Returns the base node as a Zend_Ldap_Node
*
* @return Zend_Ldap_Node
* @throws Zend_Ldap_Exception
*/
public function getBaseNode() { }

/**
* Returns the RootDSE node
*
* @return Zend_Ldap_Node_RootDse
* @throws Zend_Ldap_Exception
*/
public function getRootDseNode() { }

/**
* Returns the schema node
*
* @return Zend_Ldap_Node_Schema
* @throws Zend_Ldap_Exception
*/
public function getSchemaNode() { }

/**
* Returns the schema DN
*
* @return Zend_Ldap_Dn
*/
public function getSchemaDn() { }
}
{code}
{card}
{card:label=Zend_Ldap_Attribute}
{code}
/**
* Zend_Ldap_Attribute is a collection of LDAP attribute related functions.
*
* @category Zend
* @package Zend_Ldap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Attribute
{
const PASSWORD_HASH_MD5 = 'md5';
const PASSWORD_HASH_SHA = 'sha1';
/**
* Sets a LDAP attribute.
*
* @param array $data
* @param string $attribName
* @param mixed $value
* @param bool $append
* @return void
*/
public static function setAttribute(array &$data, $attribName, $value, $append = false) { }

/**
* Gets a LDAP attribute.
*
* @param array $data
* @param string $attribName
* @param integer $index
* @return array|mixed
*/
public static function getAttribute(array $data, $attribName, $index = null) { }

/**
* Checks if the given value(s) exist in the attribute
*
* @param array $data
* @param string $attribName
* @param mixed|array $value
* @return boolean
*/
public static function attributeHasValue(array &$data, $attribName, $value) { }

/**
* Removes duplicate values from a LDAP attribute
*
* @param array $data
* @param string $attribName
* @return void
*/
public static function removeDuplicatesFromAttribute(array &$data, $attribName) { }

/**
* Remove given values from a LDAP attribute
*
* @param array $data
* @param string $attribName
* @param mixed|array $value
* @return void
*/
public static function removeFromAttribute(array &$data, $attribName, $value) { }

private static function _valueToLdap($value) { }

private static function _valueFromLdap($value) { }

/**
* Converts a PHP data type into its LDAP representation
*
* @param mixed $value
* @return string|null - null if the PHP data type cannot be converted.
*/
public static function convertToLdapValue($value) { }

/**
* Converts an LDAP value into its PHP data type
*
* @param string $value
* @return mixed
*/
public static function convertFromLdapValue($value) { }

/**
* Converts a timestamp into its LDAP date/time representation
*
* @param integer $value
* @param boolean $utc
* @return string|null - null if the value cannot be converted.
*/
public static function convertToLdapDateTimeValue($value, $utc = false) { }

/**
* Converts LDAP date/time representation into a timestamp
*
* @param string $value
* @return integer|null - null if the value cannot be converted.
*/
public static function convertFromLdapDateTimeValue($value) { }

/**
* Sets a LDAP password.
*
* @param array $data
* @param string $password
* @param string $hashType
* @param string $attribName
* @return null
*/
public static function setPassword(array &$data, $password, $hashType = self::PASSWORD_HASH_MD5,
$attribName = 'userPassword') { }

/**
* Creates a LDAP password.
*
* @param string $password
* @param string $hashType
* @return string
*/
public static function createPassword($password, $hashType = self::PASSWORD_HASH_MD5) { }

/**
* Sets a LDAP date/time attribute.
*
* @param array $data
* @param string $attribName
* @param integer|array $value
* @param bool $utc
* @param bool $append
* @return null
*/
public static function setDateTimeAttribute(array &$data, $attribName, $value, $utc = false,
$append = false) { }

private static function _valueToLdapDateTime($value, $utc) { }

/**
* Gets a LDAP date/time attribute.
*
* @param array $data
* @param string $attribName
* @param integer $index
* @return array|integer
*/
public static function getDateTimeAttribute(array $data, $attribName, $index = null) { }

private static function _valueFromLdapDateTime($value) { }
}
{code}
{card}
{card:label=Zend_Ldap_Converter}
{code}
/**
* Zend_Ldap_Converter is a collection of useful LDAP related conversion functions.
*
* @category Zend
* @package Zend_Ldap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Converter
{
/**
* Converts all ASCII chars < 32 to "\HEX"
*
* @see Net_LDAP2_Util::asc2hex32() from Benedikt Hallinger <beni@php.net>
* @link http://pear.php.net/package/Net_LDAP2
* @author Benedikt Hallinger <beni@php.net>
*
* @param string $string String to convert
* @return string
*/
public static function ascToHex32($string) { }

/**
* Converts all Hex expressions ("\HEX") to their original ASCII characters
*
* @see Net_LDAP2_Util::hex2asc() from Benedikt Hallinger <beni@php.net>,
* heavily based on work from DavidSmith@byu.net
* @link http://pear.php.net/package/Net_LDAP2
* @author Benedikt Hallinger <beni@php.net>, heavily based on work from DavidSmith@byu.net
*
* @param string $string String to convert
* @return string
*/
public static function hex32ToAsc($string) { }
}
{code}
{card}
{card:label=Zend_Ldap_Dn}
{code}
/**
* Zend_Ldap_Dn provides an API for DN manipulation
*
* @category Zend
* @package Zend_Ldap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Dn implements ArrayAccess
{
const ATTR_CASEFOLD_NONE = 'none';
const ATTR_CASEFOLD_UPPER = 'upper';
const ATTR_CASEFOLD_LOWER = 'lower';
/**
* Creates a DN from an array or a string
*
* @param string|array $dn
* @param string|null $caseFold
* @return Zend_Ldap_Dn
* @throws Zend_Ldap_Exception
*/
public static function factory($dn, $caseFold = null) { }

/**
* Creates a DN from a string
*
* @param string $dn
* @param string|null $caseFold
* @return Zend_Ldap_Dn
* @throws Zend_Ldap_Exception
*/
public static function fromString($dn, $caseFold = null) { }

/**
* Creates a DN from an array
*
* @param array $dn
* @param string|null $caseFold
* @return Zend_Ldap_Dn
* @throws Zend_Ldap_Exception
*/
public static function fromArray(array $dn, $caseFold = null) { }

/**
* Constructor
*
* @param array $dn
* @param string|null $caseFold
*/
protected function __construct(array $dn, $caseFold) { }

/**
* Gets the RDN of the current DN
*
* @return array
* @throws Zend_Ldap_Exception if DN has no RDN (empty array)
*/
public function getRdn() { }

/**
* Gets the RDN of the current DN as a string
*
* @return string
* @throws Zend_Ldap_Exception if DN has no RDN (empty array)
*/
public function getRdnString() { }

/**
* Get the parent DN $levelUp levels up the tree
*
* @param int $levelUp
* @return Zend_Ldap_Dn
*/
public function getParentDn($levelUp = 1) { }

/**
* Get a DN part
*
* @param int $index
* @param int $length
* @return array
* @throws Zend_Ldap_Exception if index is illegal
*/
public function get($index, $length = 1) { }

/**
* Set a DN part
*
* @param int $index
* @param array $value
* @return Zend_Ldap_Dn Provides a fluent interface
* @throws Zend_Ldap_Exception if index is illegal
*/
public function set($index, array $value) { }

/**
* Remove a DN part
*
* @param int $index
* @param int $length
* @return Zend_Ldap_Dn Provides a fluent interface
* @throws Zend_Ldap_Exception if index is illegal
*/
public function remove($index, $length = 1) { }

/**
* Append a DN part
*
* @param array $value
* @return Zend_Ldap_Dn Provides a fluent interface
*/
public function append(array $value) { }

/**
* Prepend a DN part
*
* @param array $value
* @return Zend_Ldap_Dn Provides a fluent interface
*/
public function prepend(array $value) { }

/**
* Insert a DN part
*
* @param int index
* @param array $value
* @return Zend_Ldap_Dn Provides a fluent interface
* @throws Zend_Ldap_Exception if index is illegal
*/
public function insert($index, array $value) { }

/**
* Assert index is correct and usable
*
* @param mixed $index
* @return boolean
* @throws Zend_Ldap_Exception
*/
protected function _assertIndex($index) { }

/**
* Assert if value is in a correct RDN format
*
* @param array $value
* @return boolean
* @throws Zend_Ldap_Exception
*/
protected static function _assertRdn(array $value) { }

/**
* Sets the case fold
*
* @param string|null $caseFold
*/
public function setCaseFold($caseFold) { }

/**
* Return DN as a string
*
* @param string $caseFold
* @return string
* @throws Zend_Ldap_Exception
*/
public function toString($caseFold = null) { }

/**
* Return DN as an array
*
* @param string $caseFold
* @return array
*/
public function toArray($caseFold = null) { }

/**
* Do a case folding on a RDN
*
* @param array $part
* @param string $caseFold
* @return array
*/
protected static function _caseFoldRdn(array $part, $caseFold) { }

/**
* Cast to string representation {@see toString()}
*
* @return string
*/
public function __toString() { }

/**
* Required by the ArrayAccess implementation
*
* @param int $offset
* @return boolean
*/
public function offsetExists($offset) { }

/**
* Proxy to {@see get()}
* Required by the ArrayAccess implementation
*
* @param int $offset
* @return array
*/
public function offsetGet($offset) { }

/**
* Proxy to {@see set()}
* Required by the ArrayAccess implementation
*
* @param int $offset
* @param array $value
*/
public function offsetSet($offset, $value) { }

/**
* Proxy to {@see remove()}
* Required by the ArrayAccess implementation
*
* @param int $offset
*/
public function offsetUnset($offset) { }

/**
* Sets the default case fold
*
* @param string $caseFold
*/
public static function setDefaultCaseFold($caseFold) { }

/**
* Sanitizes the case fold
*
* @param string $caseFold
* @return string
*/
protected static function _sanitizeCaseFold($caseFold, $default) { }

/**
* Escapes a DN value according to RFC 2253
*
* Escapes the given VALUES according to RFC 2253 so that they can
* be safely used in LDAP DNs.
* The characters ",", "+", """, "\", "<", ">", ";", "#", " = "
* with a special meaning in RFC 2252
* are preceeded by ba backslash. Control characters with an
* ASCII code < 32 are represented as \hexpair.
* Finally all leading and trailing spaces are converted to
* sequences of \20.
* @see Net_LDAP2_Util::escape_dn_value() from Benedikt
* Hallinger <beni@php.net>
* @link http://pear.php.net/package/Net_LDAP2
* @author Benedikt Hallinger <beni@php.net>
*
* @param string|array $values An array containing the DN values
* that should be escaped
* @return array The array $values, but escaped
*/
public static function escapeValue($values = array()) { }

/**
* Undoes the conversion done by {@link escapeValue()}.
*
* Any escape sequence starting with a baskslash - hexpair or
* special character -
* will be transformed back to the corresponding character.
* @see Net_LDAP2_Util::escape_dn_value() from Benedikt
* Hallinger <beni@php.net>
* @link http://pear.php.net/package/Net_LDAP2
* @author Benedikt Hallinger <beni@php.net>
*
* @param string|array $values Array of DN Values
* @return array Same as $values, but unescaped
*/
public static function unescapeValue($values = array()) { }

/**
* Creates an array containing all parts of the given DN.
*
* Array will be of type
* array(
* array("cn" => "name1", "uid" => "user"),
* array("cn" => "name2"),
* array("dc" => "example"),
* array("dc" => "org")
* )
* for a DN of cn=name1+uid=user,cn=name2,dc=example,dc=org.
*
* @param string $dn
* @param array $keys An optional array to receive DN keys (e.g. CN, OU, DC, ...)
* @param array $vals An optional array to receive DN values
* @param string $caseFold
* @return array
* @throws Zend_Ldap_Exception
*/
public static function explodeDn($dn, array &$keys = null, array &$vals = null,
$caseFold = self::ATTR_CASEFOLD_NONE) { }

/**
* @param string $dn The DN to parse
* @param array $keys An optional array to receive DN keys (e.g. CN, OU, DC, ...)
* @param array $vals An optional array to receive DN values
* @param string $caseFold
* @return bool True if the DN was successfully parsed or false if the string is not a valid DN.
*/
public static function checkDn($dn, array &$keys = null, array &$vals = null,
$caseFold = self::ATTR_CASEFOLD_NONE) { }

/**
* Returns a DN part in the form $attribute = $value
*
* This method supports the creation of multi-valued RDNs
* $part must contain an even number of elemets.
*
* @param array $attribute
* @param string $caseFold
* @return string
* @throws Zend_Ldap_Exception
*/
public static function implodeRdn(array $part, $caseFold = self::ATTR_CASEFOLD_NONE) { }

/**
* Implodes an array in the form delivered by {@link explodeDn()}
* to a DN string.
*
* $dnArray must be of type
* array(
* array("cn" => "name1", "uid" => "user"),
* array("cn" => "name2"),
* array("dc" => "example"),
* array("dc" => "org")
* )
*
* @param array $dnArray
* @param string $caseFold
* @param string $separator
* @return string
* @throws Zend_Ldap_Exception
*/
public static function implodeDn(array $dnArray, $caseFold = self::ATTR_CASEFOLD_NONE,
$separator = ',') { }

/**
* Checks if given $childDn is beneath $parentDn subtree.
*
* @param string|Zend_Ldap_Dn $childDn
* @param string|Zend_Ldap_Dn $parentDn
* @return boolean
*/
public static function isChildOf($childDn, $parentDn) { }
}
{code}
{card}
{card:label=Zend_Ldap_Exception}
{code}
class Zend_Ldap_Exception extends Zend_Exception
{
const LDAP_SUCCESS = 0x00;
const LDAP_OPERATIONS_ERROR = 0x01;
const LDAP_PROTOCOL_ERROR = 0x02;
const LDAP_TIMELIMIT_EXCEEDED = 0x03;
const LDAP_SIZELIMIT_EXCEEDED = 0x04;
const LDAP_COMPARE_FALSE = 0x05;
const LDAP_COMPARE_TRUE = 0x06;
const LDAP_AUTH_METHOD_NOT_SUPPORTED = 0x07;
const LDAP_STRONG_AUTH_REQUIRED = 0x08;
const LDAP_PARTIAL_RESULTS = 0x09;
const LDAP_REFERRAL = 0x0a;
const LDAP_ADMINLIMIT_EXCEEDED = 0x0b;
const LDAP_UNAVAILABLE_CRITICAL_EXTENSION = 0x0c;
const LDAP_CONFIDENTIALITY_REQUIRED = 0x0d;
const LDAP_SASL_BIND_IN_PROGRESS = 0x0e;
const LDAP_NO_SUCH_ATTRIBUTE = 0x10;
const LDAP_UNDEFINED_TYPE = 0x11;
const LDAP_INAPPROPRIATE_MATCHING = 0x12;
const LDAP_CONSTRAINT_VIOLATION = 0x13;
const LDAP_TYPE_OR_VALUE_EXISTS = 0x14;
const LDAP_INVALID_SYNTAX = 0x15;
const LDAP_NO_SUCH_OBJECT = 0x20;
const LDAP_ALIAS_PROBLEM = 0x21;
const LDAP_INVALID_DN_SYNTAX = 0x22;
const LDAP_IS_LEAF = 0x23;
const LDAP_ALIAS_DEREF_PROBLEM = 0x24;
const LDAP_PROXY_AUTHZ_FAILURE = 0x2F;
const LDAP_INAPPROPRIATE_AUTH = 0x30;
const LDAP_INVALID_CREDENTIALS = 0x31;
const LDAP_INSUFFICIENT_ACCESS = 0x32;
const LDAP_BUSY = 0x33;
const LDAP_UNAVAILABLE = 0x34;
const LDAP_UNWILLING_TO_PERFORM = 0x35;
const LDAP_LOOP_DETECT = 0x36;
const LDAP_NAMING_VIOLATION = 0x40;
const LDAP_OBJECT_CLASS_VIOLATION = 0x41;
const LDAP_NOT_ALLOWED_ON_NONLEAF = 0x42;
const LDAP_NOT_ALLOWED_ON_RDN = 0x43;
const LDAP_ALREADY_EXISTS = 0x44;
const LDAP_NO_OBJECT_CLASS_MODS = 0x45;
const LDAP_RESULTS_TOO_LARGE = 0x46;
const LDAP_AFFECTS_MULTIPLE_DSAS = 0x47;
const LDAP_OTHER = 0x50;
const LDAP_SERVER_DOWN = 0x51;
const LDAP_LOCAL_ERROR = 0x52;
const LDAP_ENCODING_ERROR = 0x53;
const LDAP_DECODING_ERROR = 0x54;
const LDAP_TIMEOUT = 0x55;
const LDAP_AUTH_UNKNOWN = 0x56;
const LDAP_FILTER_ERROR = 0x57;
const LDAP_USER_CANCELLED = 0x58;
const LDAP_PARAM_ERROR = 0x59;
const LDAP_NO_MEMORY = 0x5a;
const LDAP_CONNECT_ERROR = 0x5b;
const LDAP_NOT_SUPPORTED = 0x5c;
const LDAP_CONTROL_NOT_FOUND = 0x5d;
const LDAP_NO_RESULTS_RETURNED = 0x5e;
const LDAP_MORE_RESULTS_TO_RETURN = 0x5f;
const LDAP_CLIENT_LOOP = 0x60;
const LDAP_REFERRAL_LIMIT_EXCEEDED = 0x61;
const LDAP_CUP_RESOURCES_EXHAUSTED = 0x71;
const LDAP_CUP_SECURITY_VIOLATION = 0x72;
const LDAP_CUP_INVALID_DATA = 0x73;
const LDAP_CUP_UNSUPPORTED_SCHEME = 0x74;
const LDAP_CUP_RELOAD_REQUIRED = 0x75;
const LDAP_CANCELLED = 0x76;
const LDAP_NO_SUCH_OPERATION = 0x77;
const LDAP_TOO_LATE = 0x78;
const LDAP_CANNOT_CANCEL = 0x79;
const LDAP_ASSERTION_FAILED = 0x7A;
const LDAP_SYNC_REFRESH_REQUIRED = 0x1000;
const LDAP_X_SYNC_REFRESH_REQUIRED = 0x4100;
const LDAP_X_NO_OPERATION = 0x410e;
const LDAP_X_ASSERTION_FAILED = 0x410f;
const LDAP_X_NO_REFERRALS_FOUND = 0x4110;
const LDAP_X_CANNOT_CHAIN = 0x4111;
/* internal error code constants */
const LDAP_X_DOMAIN_MISMATCH = 0x7001;
/**
* @param Zend_Ldap $ldap A Zend_Ldap object
* @param string $str An informtive exception message
* @param int $code An LDAP error code
*/
public function __construct(Zend_Ldap $ldap = null, $str = null, $code = 0) { }

parent::__construct($message, $code);
/**
* @deprecated not necessary any more - will be removed
* @param Zend_Ldap $ldap A Zend_Ldap object
* @return int The current error code for the resource
*/
public static function getLdapCode(Zend_Ldap $ldap = null) { }

/**
* @deprecated will be removed
* @param string $message An informtive exception message
*
*/
public function setMessage($message) { }

/**
* @deprecated will be removed
* @return int The current error code for this exception
*/
public function getErrorCode() { }
}
{code}
{card}
{deck}

{deck:id=Core classes 2}
{card:label=Zend_Ldap_Collection}
{code}
/**
* Zend_Ldap_Collection wraps a list of LDAP entries.
*
* @category Zend
* @package Zend_Ldap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Collection implements Iterator, Countable
{
public function __destruct() { }

/**
* Closes the current result set
*
* @return bool
*/
public function close() { }

/**
* Get all entries as an array
*
* @return array
*/
public function toArray() { }

/**
* Get first entry
*
* @return array
*/
public function getFirst() { }

/**
* Returns the number of items in current result
* Implements Countable
*
* @return int
*/
public function count() { }

/**
* Return the current result item
* Implements Iterator
*
* @return array
* @throws Zend_Ldap_Exception
*/
public function current() { }

/**
* Creates the data structure for the given entry data
*
* @param array $data
* @return array
*/
protected function _createEntry(array $data) { }

/**
* Return the result item key
* Implements Iterator
*
* @return int
*/
public function key() { }

/**
* Move forward to next result item
* Implements Iterator
*
* @throws Zend_Ldap_Exception
*/
public function next() { }

/**
* Rewind the Iterator to the first result item
* Implements Iterator
*
* @throws Zend_Ldap_Exception
*/
public function rewind() { }

/**
* Check if there is a current result item
* after calls to rewind() or next()
* Implements Iterator
*
* @return bool
*/
public function valid() { }
}
{code}
{card}
{card:label=Zend_Ldap_Collection_Iterator_Interface}
{code}
/**
* Zend_Ldap_Collection_Iterator_Interface provides a contract for
* adapter specific collection iterators
*
* @category Zend
* @package Zend_Ldap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Ldap_Collection_Iterator_Interface extends Iterator, Countable
{
/**
* Closes the current result set
*
* @return bool
*/
public function close();

/**
* Gets the current LDAP connection.
*
* @return Zend_Ldap
*/
public function getLdap();
}
{code}
{card}
{card:label=Zend_Ldap_Collection_Iterator_Default}
{code}
/**
* Zend_Ldap_Collection_Iterator_Default is the default collection iterator implementation
* using ext/ldap
*
* @category Zend
* @package Zend_Ldap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Collection_Iterator_Default implements Zend_Ldap_Collection_Iterator_Interface
{
/**
* Constructor.
*
* @param Zend_Ldap $ldap
* @param resource $resultId
* @return void
*/
public function __construct(Zend_Ldap $ldap, $resultId) { }

public function __destruct() { }

/**
* Closes the current result set
*
* @return bool
*/
public function close() { }

/**
* Gets the current LDAP connection.
*
* @return Zend_Ldap
*/
public function getLdap() { }

/**
* Returns the number of items in current result
* Implements Countable
*
* @return int
*/
public function count() { }

/**
* Return the current result item
* Implements Iterator
*
* @return array
* @throws Zend_Ldap_Exception
*/
public function current() { }

/**
* Return the result item key
* Implements Iterator
*
* @return int
*/
public function key() { }

/**
* Move forward to next result item
* Implements Iterator
*
* @throws Zend_Ldap_Exception
*/
public function next() { }

/**
* Rewind the Iterator to the first result item
* Implements Iterator
*
* @throws Zend_Ldap_Exception
*/
public function rewind() { }

/**
* Stores the current DN
*
* @return void
* @throws Zend_Ldap_Exception
*/
protected function _storeCurrentDn() { }

/**
* Check if there is a current result item
* after calls to rewind() or next()
* Implements Iterator
*
* @return bool
*/
public function valid() { }
}
{code}
{card}
{deck}

||Filter subpackage||
{deck:id=Filter subpackage 1}
{card:label=Zend_Ldap_Filter}
{code}
/**
* Zend_Ldap_Filter.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Filter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Filter extends Zend_Ldap_Filter_String
{
const TYPE_EQUALS = '=';
const TYPE_GREATER = '>';
const TYPE_GREATEROREQUAL = '>=';
const TYPE_LESS = '<';
const TYPE_LESSOREQUAL = '<=';
const TYPE_APPROX = '~=';
/**
* Creates an 'equals' filter.
* (attr=value)
*
* @param string $attr
* @param string $value
* @return Zend_Ldap_Filter
*/
public static function equals($attr, $value) { }

/**
* Creates a 'begins with' filter.
* (attr=value*)
*
* @param string $attr
* @param string $value
* @return Zend_Ldap_Filter
*/
public static function begins($attr, $value) { }

/**
* Creates an 'ends with' filter.
* (attr=*value)
*
* @param string $attr
* @param string $value
* @return Zend_Ldap_Filter
*/
public static function ends($attr, $value) { }

/**
* Creates a 'contains' filter.
* (attr=*value*)
*
* @param string $attr
* @param string $value
* @return Zend_Ldap_Filter
*/
public static function contains($attr, $value) { }

/**
* Creates a 'greater' filter.
* (attr>value)
*
* @param string $attr
* @param string $value
* @return Zend_Ldap_Filter
*/
public static function greater($attr, $value) { }

/**
* Creates a 'greater or equal' filter.
* (attr>=value)
*
* @param string $attr
* @param string $value
* @return Zend_Ldap_Filter
*/
public static function greaterOrEqual($attr, $value) { }

/**
* Creates a 'less' filter.
* (attr<value)
*
* @param string $attr
* @param string $value
* @return Zend_Ldap_Filter
*/
public static function less($attr, $value) { }

/**
* Creates an 'less or equal' filter.
* (attr<=value)
*
* @param string $attr
* @param string $value
* @return Zend_Ldap_Filter
*/
public static function lessOrEqual($attr, $value) { }

/**
* Creates an 'approx' filter.
* (attr~=value)
*
* @param string $attr
* @param string $value
* @return Zend_Ldap_Filter
*/
public static function approx($attr, $value) { }

/**
* Creates an 'any' filter.
* (attr=*)
*
* @param string $attr
* @return Zend_Ldap_Filter
*/
public static function any($attr) { }

/**
* Creates a simple custom string filter.
*
* @param string $filter
* @return Zend_Ldap_Filter_String
*/
public static function string($filter) { }

/**
* Creates a simple string filter to be used with a mask.
*
* @param string $mask
* @param string $value
* @return Zend_Ldap_Filter_Mask
*/
public static function mask($mask, $value) { }

/**
* Creates an 'and' filter.
*
* @param Zend_Ldap_Filter_Abstract $filter,...
* @return Zend_Ldap_Filter_And
*/
public static function andFilter($filter) { }

/**
* Creates an 'or' filter.
*
* @param Zend_Ldap_Filter_Abstract $filter,...
* @return Zend_Ldap_Filter_Or
*/
public static function orFilter($filter) { }

/**
* Create a filter string.
*
* @param string $attr
* @param string $value
* @param string $filtertype
* @param string $prepend
* @param string $append
* @return string
*/
private static function _createFilterString($attr, $value, $filtertype, $prepend = null, $append = null) { }

/**
* Creates a new Zend_Ldap_Filter.
*
* @param string $attr
* @param string $value
* @param string $filtertype
* @param string $prepend
* @param string $append
*/
public function __construct($attr, $value, $filtertype, $prepend = null, $append = null) { }

}
{code}
{card}
{card:label=Zend_Ldap_Filter_Abstract}
{code}
/**
* Zend_Ldap_Filter_Abstract provides a base implementation for filters.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Filter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Ldap_Filter_Abstract
{
/**
* Returns a string representation of the filter.
*
* @return string
*/
abstract public function toString(); { }

/**
* Returns a string representation of the filter.
* @see toString()
*
* @return string
*/
public function __toString() { }

/**
* Negates the filter.
*
* @return Zend_Ldap_Filter_Abstract
*/
public function negate() { }

/**
* Creates an 'and' filter.
*
* @param Zend_Ldap_Filter_Abstract $filter,...
* @return Zend_Ldap_Filter_And
*/
public function addAnd($filter) { }

/**
* Creates an 'or' filter.
*
* @param Zend_Ldap_Filter_Abstract $filter,...
* @return Zend_Ldap_Filter_Or
*/
public function addOr($filter) { }

/**
* Escapes the given VALUES according to RFC 2254 so that they can be safely used in LDAP filters.
*
* Any control characters with an ACII code < 32 as well as the characters with special meaning in
* LDAP filters "*", "(", ")", and "\" (the backslash) are converted into the representation of a
* backslash followed by two hex digits representing the hexadecimal value of the character.
* @see Net_LDAP2_Util::escape_filter_value() from Benedikt Hallinger <beni@php.net>
* @link http://pear.php.net/package/Net_LDAP2
* @author Benedikt Hallinger <beni@php.net>
*
* @param string|array $values Array of values to escape
* @return array Array $values, but escaped
*/
public static function escapeValue($values = array()) { }

/**
* Undoes the conversion done by {@link escapeValue()}.
*
* Converts any sequences of a backslash followed by two hex digits into the corresponding character.
* @see Net_LDAP2_Util::escape_filter_value() from Benedikt Hallinger <beni@php.net>
* @link http://pear.php.net/package/Net_LDAP2
* @author Benedikt Hallinger <beni@php.net>
*
* @param string|array $values Array of values to escape
* @return array Array $values, but unescaped
*/
public static function unescapeValue($values = array()) { }
}
{code}
{card}
{card:label=Zend_Ldap_Filter_Exception}
{code}
/**
* @category Zend
* @package Zend_Ldap
* @subpackage Filter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Filter_Exception extends Zend_Exception
}
{code}
{card}
{card:label=Zend_Ldap_Filter_Logical}
{code}
/**
* Zend_Ldap_Filter_Logical provides a base implementation for a grouping filter.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Filter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Ldap_Filter_Logical extends Zend_Ldap_Filter_Abstract
{
const TYPE_AND = '&';
const TYPE_OR = '|';
/**
* Creates a new grouping filter.
*
* @param array $subfilters
* @param string $symbol
*/
protected function __construct(array $subfilters, $symbol) { }

/**
* Returns a string representation of the filter.
*
* @return string
*/
public function toString() { }
}
{code}
{card}
{deck}

{deck:id=Filter subpackage 2}
{card:label=Zend_Ldap_Filter_And}
{code}
/**
* Zend_Ldap_Filter_And provides an 'and' filter.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Filter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Filter_And extends Zend_Ldap_Filter_Logical
{
/**
* Creates an 'and' grouping filter.
*
* @param array $subfilters
*/
public function __construct(array $subfilters) { }

}
{code}
{card}
{card:label=Zend_Ldap_Filter_Mask}
{code}
/**
* Zend_Ldap_Filter_Mask provides a simple string filter to be used with a mask.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Filter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Filter_Mask extends Zend_Ldap_Filter_String
{
/**
* Creates a Zend_Ldap_Filter_String.
*
* @param string $mask
* @param string $value,...
*/
public function __construct($mask, $value) { }

parent::__construct($filter);
/**
* Returns a string representation of the filter.
*
* @return string
*/
public function toString() { }
}
{code}
{card}
{card:label=Zend_Ldap_Filter_Not}
{code}
/**
* Zend_Ldap_Filter_Not provides a negation filter.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Filter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Filter_Not extends Zend_Ldap_Filter_Abstract
{
/**
* Negates the filter.
*
* @return Zend_Ldap_Filter_Abstract
*/
public function negate() { }

/**
* Returns a string representation of the filter.
*
* @return string
*/
public function toString() { }
}
{code}
{card}
{card:label=Zend_Ldap_Filter_Or}
{code}
/**
* Zend_Ldap_Filter_Or provides an 'or' filter.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Filter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Filter_Or extends Zend_Ldap_Filter_Logical
{
/**
* Creates an 'or' grouping filter.
*
* @param array $subfilters
*/
public function __construct(array $subfilters) { }

}
{code}
{card}
{card:label=Zend_Ldap_Filter_String}
{code}
/**
* Zend_Ldap_Filter_String provides a simple custom string filter.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Filter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Filter_String extends Zend_Ldap_Filter_Abstract
{
/**
* Creates a Zend_Ldap_Filter_String.
*
* @param string $filter
*/
public function __construct($filter) { }

/**
* Returns a string representation of the filter.
*
* @return string
*/
public function toString() { }
}
{code}
{card}
{deck}

||Node subpackage||
{deck:id=Node subpackage 1}
{card:label=Zend_Ldap_Node}
{code}
/**
* Zend_Ldap_Node provides an object oriented view into a LDAP node.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Node
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Node extends Zend_Ldap_Node_Abstract implements Iterator, RecursiveIterator
{
parent::__construct($dn, $data, $fromDataSource);
/**
* Serialization callback
*
* Only DN and attributes will be serialized.
*
* @return array
*/
public function __sleep() { }

/**
* Deserialization callback
*
* Enforces a detached node.
*
* @return null
*/
public function __wakeup() { }

/**
* Gets the current LDAP connection.
*
* @return Zend_Ldap
* @throws Zend_Ldap_Exception
*/
public function getLdap() { }

/**
* Attach node to an LDAP connection
*
* This is an offline method.
*
* @uses Zend_Ldap_Dn::isChildOf()
* @param Zend_Ldap $ldap
* @return Zend_Ldap_Node *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function attachLdap(Zend_Ldap $ldap) { }

/**
* Detach node from LDAP connection
*
* This is an offline method.
*
* @return Zend_Ldap_Node *Provides a fluid interface*
*/
public function detachLdap() { }

/**
* Checks if the current node is attached to a LDAP server.
*
* This is an offline method.
*
* @return boolean
*/
public function isAttached() { }

/**
* @param array $data
* @param boolean $fromDataSource
* @throws Zend_Ldap_Exception
*/
protected function _loadData(array $data, $fromDataSource) { }

/**
* Factory method to create a new detached Zend_Ldap_Node for a given DN.
*
* @param string|array|Zend_Ldap_Dn $dn
* @param array $objectClass
* @return Zend_Ldap_Node
* @throws Zend_Ldap_Exception
*/
public static function create($dn, array $objectClass = array()) { }

/**
* Factory method to create an attached Zend_Ldap_Node for a given DN.
*
* @param string|array|Zend_Ldap_Dn $dn
* @param Zend_Ldap $ldap
* @return Zend_Ldap_Node
* @throws Zend_Ldap_Exception
*/
public static function fromLdap($dn, Zend_Ldap $ldap) { }

/**
* Factory method to create a detached Zend_Ldap_Node from array data.
*
* @param array $data
* @param boolean $fromDataSource
* @return Zend_Ldap_Node
* @throws Zend_Ldap_Exception
*/
public static function fromArray(array $data, $fromDataSource = false) { }

/**
* Ensures that teh RDN attributes are correctly set.
*
* @return void
*/
protected function _ensureRdnAttributeValues() { }

/**
* Marks this node as new.
*
* Node will be added (instead of updated) on calling update() if $new is true.
*
* @param boolean $new
*/
protected function _markAsNew($new) { }

/**
* Tells if the node is consiedered as new (not present on the server)
*
* Please note, that this doesn't tell you if the node is present on the server.
* Use {@link exits()} to see if a node is already there.
*
* @return boolean
*/
public function isNew() { }

/**
* Marks this node as to be deleted.
*
* Node will be deleted on calling update() if $delete is true.
*
* @param boolean $delete
*/
protected function _markAsToBeDeleted($delete) { }

/**
* Is this node going to be deleted once update() is called?
*
* @return boolean
*/
public function willBeDeleted() { }

/**
* Marks this node as to be deleted
*
* Node will be deleted on calling update() if $delete is true.
*
* @return Zend_Ldap_Node *Provides a fluid interface*
*/
public function delete() { }

/**
* Is this node going to be moved once update() is called?
*
* @return boolean
*/
public function willBeMoved() { }

/**
* Sends all pending changes to the LDAP server
*
* @param Zend_Ldap $ldap
* @return Zend_Ldap_Node *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function update(Zend_Ldap $ldap = null) { }

/**
* Gets the DN of the current node as a Zend_Ldap_Dn.
*
* This is an offline method.
*
* @return Zend_Ldap_Dn
*/
protected function _getDn() { }

/**
* Gets the current DN of the current node as a Zend_Ldap_Dn.
* The method returns a clone of the node's DN to prohibit modification.
*
* This is an offline method.
*
* @return Zend_Ldap_Dn
*/
public function getCurrentDn() { }

/**
* Sets the new DN for this node
*
* This is an offline method.
*
* @param Zend_Ldap_Dn|string|array $newDn
* @throws Zend_Ldap_Exception
* @return Zend_Ldap_Node *Provides a fluid interface*
*/
public function setDn($newDn) { }

/**
* {@see setDn()}
*
* This is an offline method.
*
* @param Zend_Ldap_Dn|string|array $newDn
* @throws Zend_Ldap_Exception
* @return Zend_Ldap_Node *Provides a fluid interface*
*/
public function move($newDn) { }

/**
* {@see setDn()}
*
* This is an offline method.
*
* @param Zend_Ldap_Dn|string|array $newDn
* @throws Zend_Ldap_Exception
* @return Zend_Ldap_Node *Provides a fluid interface*
*/
public function rename($newDn) { }

/**
* Sets the objectClass.
*
* This is an offline method.
*
* @param array|string $value
* @return Zend_Ldap_Node *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function setObjectClass($value) { }

/**
* Appends to the objectClass.
*
* This is an offline method.
*
* @param array|string $value
* @return Zend_Ldap_Node *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function appendObjectClass($value) { }

/**
* Returns a LDIF representation of the current node
*
* @param array $options Additional options used during encoding
* @return string
*/
public function toLdif(array $options = array()) { }

/**
* Gets changed node data.
*
* The array contains all changed attributes.
* This format can be used in {@link Zend_Ldap::add()} and {@link Zend_Ldap::update()}.
*
* This is an offline method.
*
* @return array
*/
public function getChangedData() { }

/**
* Returns all changes made.
*
* This is an offline method.
*
* @return array
*/
public function getChanges() { }

/**
* Sets a LDAP attribute.
*
* This is an offline method.
*
* @param string $name
* @param mixed $value
* @return Zend_Ldap_Node *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function setAttribute($name, $value) { }

/**
* Appends to a LDAP attribute.
*
* This is an offline method.
*
* @param string $name
* @param mixed $value
* @return Zend_Ldap_Node *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function appendToAttribute($name, $value) { }

/**
* Checks if the attribute can be set and sets it accordingly.
*
* @param string $name
* @param mixed $value
* @param bool $append
* @throws Zend_Ldap_Exception
*/
protected function _setAttribute($name, $value, $append) { }

/**
* Sets a LDAP date/time attribute.
*
* This is an offline method.
*
* @param string $name
* @param integer|array $value
* @param bool $utc
* @return Zend_Ldap_Node *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function setDateTimeAttribute($name, $value, $utc = false) { }

/**
* Appends to a LDAP date/time attribute.
*
* This is an offline method.
*
* @param string $name
* @param integer|array $value
* @param bool $utc
* @return Zend_Ldap_Node *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function appendToDateTimeAttribute($name, $value, $utc = false) { }

/**
* Checks if the attribute can be set and sets it accordingly.
*
* @param string $name
* @param integer|array $value
* @param bool $utc
* @param bool $append
* @throws Zend_Ldap_Exception
*/
protected function _setDateTimeAttribute($name, $value, $utc, $append) { }

/**
* Sets a LDAP password.
*
* @param string $password
* @param string $hashType
* @param string $attribName
* @return Zend_Ldap_Node *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function setPasswordAttribute($password, $hashType = Zend_Ldap_Attribute::PASSWORD_HASH_MD5,
$attribName = 'userPassword') { }

/**
* Deletes a LDAP attribute.
*
* This method deletes the attribute.
*
* This is an offline method.
*
* @param string $name
* @return Zend_Ldap_Node *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function deleteAttribute($name) { }

/**
* Removes duplicate values from a LDAP attribute
*
* @param string $attribName
* @return void
*/
public function removeDuplicatesFromAttribute($attribName) { }

/**
* Remove given values from a LDAP attribute
*
* @param string $attribName
* @param mixed|array $value
* @return void
*/
public function removeFromAttribute($attribName, $value) { }

/**
* @param string $name
* @return boolean
* @throws Zend_Ldap_Exception
*/
protected function _assertChangeableAttribute($name) { }

/**
* Sets a LDAP attribute.
*
* This is an offline method.
*
* @param string $name
* @param mixed $value
* @return null
* @throws Zend_Ldap_Exception
*/
public function __set($name, $value) { }

/**
* Deletes a LDAP attribute.
*
* This method deletes the attribute.
*
* This is an offline method.
*
* @param string $name
* @return null
* @throws Zend_Ldap_Exception
*/
public function __unset($name) { }

/**
* Sets a LDAP attribute.
* Implements ArrayAccess.
*
* This is an offline method.
*
* @param string $name
* @param mixed $value
* @return null
* @throws Zend_Ldap_Exception
*/
public function offsetSet($name, $value) { }

/**
* Deletes a LDAP attribute.
* Implements ArrayAccess.
*
* This method deletes the attribute.
*
* This is an offline method.
*
* @param string $name
* @return null
* @throws Zend_Ldap_Exception
*/
public function offsetUnset($name) { }

/**
* Check if node exists on LDAP.
*
* This is an online method.
*
* @param Zend_Ldap $ldap
* @return boolean
* @throws Zend_Ldap_Exception
*/
public function exists(Zend_Ldap $ldap = null) { }

/**
* Reload node attributes from LDAP.
*
* This is an online method.
*
* @param Zend_Ldap $ldap
* @return Zend_Ldap_Node *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function reload(Zend_Ldap $ldap = null) { }

/**
* Search current subtree with given options.
*
* This is an online method.
*
* @param string|Zend_Ldap_Filter_Abstract $filter
* @param integer $scope
* @param string $sort
* @return Zend_Ldap_Node_Collection
* @throws Zend_Ldap_Exception
*/
public function searchSubtree($filter, $scope = Zend_Ldap::SEARCH_SCOPE_SUB, $sort = null) { }

/**
* Count items in current subtree found by given filter.
*
* This is an online method.
*
* @param string|Zend_Ldap_Filter_Abstract $filter
* @param integer $scope
* @return integer
* @throws Zend_Ldap_Exception
*/
public function countSubtree($filter, $scope = Zend_Ldap::SEARCH_SCOPE_SUB) { }

/**
* Count children of current node.
*
* This is an online method.
*
* @return integer
* @throws Zend_Ldap_Exception
*/
public function countChildren() { }

/**
* Gets children of current node.
*
* This is an online method.
*
* @param string|Zend_Ldap_Filter_Abstract $filter
* @param string $sort
* @return Zend_Ldap_Node_Collection
* @throws Zend_Ldap_Exception
*/
public function searchChildren($filter, $sort = null) { }

/**
* Checks if current node has children.
* Returns whether the current element has children.
*
* Can be used offline but returns false if children have not been retrieved yet.
*
* @return boolean
* @throws Zend_Ldap_Exception
*/
public function hasChildren() { }

/**
* Returns the children for the current node.
*
* Can be used offline but returns an empty array if children have not been retrieved yet.
*
* @return Zend_Ldap_Node_ChildrenIterator
* @throws Zend_Ldap_Exception
*/
public function getChildren() { }

/**
* Returns the parent of the current node.
*
* @param Zend_Ldap $ldap
* @return Zend_Ldap_Node
* @throws Zend_Ldap_Exception
*/
public function getParent(Zend_Ldap $ldap = null) { }

/**
* Return the current attribute.
* Implements Iterator
*
* @return array
*/
public function current() { }

/**
* Return the attribute name.
* Implements Iterator
*
* @return string
*/
public function key() { }

/**
* Move forward to next attribute.
* Implements Iterator
*/
public function next() { }

/**
* Rewind the Iterator to the first attribute.
* Implements Iterator
*/
public function rewind() { }

/**
* Check if there is a current attribute
* after calls to rewind() or next().
* Implements Iterator
*
* @return bool
*/
public function valid() { }
}
{code}
{card}
{card:label=Zend_Ldap_Node_Abstract}
{code}
/**
* Zend_Ldap_Node_Abstract provides a bas eimplementation for LDAP nodes
*
* @category Zend
* @package Zend_Ldap
* @subpackage Node
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Ldap_Node_Abstract implements ArrayAccess, Countable
{
/**
* @param array $data
* @param boolean $fromDataSource
* @throws Zend_Ldap_Exception
*/
protected function _loadData(array $data, $fromDataSource) { }

/**
* Reload node attributes from LDAP.
*
* This is an online method.
*
* @param Zend_Ldap $ldap
* @return Zend_Ldap_Node_Abstract *Provides a fluid interface*
* @throws Zend_Ldap_Exception
*/
public function reload(Zend_Ldap $ldap = null) { }

/**
* Gets the DN of the current node as a Zend_Ldap_Dn.
*
* This is an offline method.
*
* @return Zend_Ldap_Dn
*/
protected function _getDn() { }

/**
* Gets the DN of the current node as a Zend_Ldap_Dn.
* The method returns a clone of the node's DN to prohibit modification.
*
* This is an offline method.
*
* @return Zend_Ldap_Dn
*/
public function getDn() { }

/**
* Gets the DN of the current node as a string.
*
* This is an offline method.
*
* @return string
*/
public function getDnString() { }

/**
* Gets the DN of the current node as an array.
*
* This is an offline method.
*
* @return array
*/
public function getDnArray() { }

/**
* Gets the RDN of the current node as a string.
*
* This is an offline method.
*
* @return string
*/
public function getRdnString() { }

/**
* Gets the RDN of the current node as an array.
*
* This is an offline method.
*
* @return array
*/
public function getRdnArray() { }

/**
* Gets the objectClass of the node
*
* @return array
*/
public function getObjectClass() { }

/**
* Gets all attributes of node.
*
* The collection contains all attributes.
*
* This is an offline method.
*
* @param boolean $includeSystemAttributes
* @return array
*/
public function getAttributes($includeSystemAttributes = true) { }

/**
* Returns the DN of the current node. {@see getDnString()}
*
* @return string
*/
public function toString() { }

/**
* Cast to string representation {@see toString()}
*
* @return string
*/
public function __toString() { }

/**
* Returns an array representation of the current node
*
* @param boolean $includeSystemAttributes
* @return array
*/
public function toArray($includeSystemAttributes = true) { }

/**
* Returns a JSON representation of the current node
*
* @param boolean $includeSystemAttributes
* @return string
*/
public function toJson($includeSystemAttributes = true) { }

/**
* Gets node attributes.
*
* The array contains all attributes in its internal format (no conversion).
*
* This is an offline method.
*
* @param boolean $includeSystemAttributes
* @return array
*/
public function getData($includeSystemAttributes = true) { }

/**
* Checks whether a given attribute exists.
*
* If $emptyExists is false empty attributes (containing only array()) are
* treated as non-existent returning false.
* If $emptyExists is true empty attributes are treated as existent returning
* true. In this case method returns false only if the attribute name is
* missing in the key-collection.
*
* @param string $name
* @param boolean $emptyExists
* @return boolean
*/
public function existsAttribute($name, $emptyExists = false) { }

/**
* Checks if the given value(s) exist in the attribute
*
* @param string $attribName
* @param mixed|array $value
* @return boolean
*/
public function attributeHasValue($attribName, $value) { }

/**
* Gets a LDAP attribute.
*
* This is an offline method.
*
* @param string $name
* @param integer $index
* @return mixed
* @throws Zend_Ldap_Exception
*/
public function getAttribute($name, $index = null) { }

/**
* Gets a LDAP date/time attribute.
*
* This is an offline method.
*
* @param string $name
* @param integer $index
* @return array|integer
* @throws Zend_Ldap_Exception
*/
public function getDateTimeAttribute($name, $index = null) { }

/**
* Sets a LDAP attribute.
*
* This is an offline method.
*
* @param string $name
* @param mixed $value
* @return null
* @throws BadMethodCallException
*/
public function __set($name, $value) { }

/**
* Gets a LDAP attribute.
*
* This is an offline method.
*
* @param string $name
* @return array
* @throws Zend_Ldap_Exception
*/
public function __get($name) { }

/**
* Deletes a LDAP attribute.
*
* This method deletes the attribute.
*
* This is an offline method.
*
* @param string $name
* @return null
* @throws BadMethodCallException
*/
public function __unset($name) { }

/**
* Checks whether a given attribute exists.
*
* Empty attributes will be treated as non-existent.
*
* @param string $name
* @return boolean
*/
public function __isset($name) { }

/**
* Sets a LDAP attribute.
* Implements ArrayAccess.
*
* This is an offline method.
*
* @param string $name
* @param mixed $value
* @return null
* @throws BadMethodCallException
*/
public function offsetSet($name, $value) { }

/**
* Gets a LDAP attribute.
* Implements ArrayAccess.
*
* This is an offline method.
*
* @param string $name
* @return array
* @throws Zend_Ldap_Exception
*/
public function offsetGet($name) { }

/**
* Deletes a LDAP attribute.
* Implements ArrayAccess.
*
* This method deletes the attribute.
*
* This is an offline method.
*
* @param string $name
* @return null
* @throws BadMethodCallException
*/
public function offsetUnset($name) { }

/**
* Checks whether a given attribute exists.
* Implements ArrayAccess.
*
* Empty attributes will be treated as non-existent.
*
* @param string $name
* @return boolean
*/
public function offsetExists($name) { }

/**
* Returns the number of attributes in node.
* Implements Countable
*
* @return int
*/
public function count() { }
}
{code}
{card}
{card:label=Zend_Ldap_Node_ChildrenIterator}
{code}
/**
* Zend_Ldap_Node_ChildrenIterator provides an iterator to a collection of children nodes.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Node
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Node_ChildrenIterator implements Iterator, Countable, RecursiveIterator, ArrayAccess
{
/**
* Constructor.
*
* @param array $data
* @return void
*/
public function __construct(array $data) { }

/**
* Returns the number of child nodes.
* Implements Countable
*
* @return int
*/
public function count() { }

/**
* Return the current child.
* Implements Iterator
*
* @return Zend_Ldap_Node
*/
public function current() { }

/**
* Return the child'd RDN.
* Implements Iterator
*
* @return string
*/
public function key() { }

/**
* Move forward to next child.
* Implements Iterator
*/
public function next() { }

/**
* Rewind the Iterator to the first child.
* Implements Iterator
*/
public function rewind() { }

/**
* Check if there is a current child
* after calls to rewind() or next().
* Implements Iterator
*
* @return bool
*/
public function valid() { }

/**
* Checks if current node has children.
* Returns whether the current element has children.
*
* @return boolean
*/
public function hasChildren() { }

/**
* Returns the children for the current node.
*
* @return Zend_Ldap_Node_ChildrenIterator
*/
public function getChildren() { }

/**
* Returns a child with a given RDN.
* Implements ArrayAccess.
*
* @param string $rdn
* @return Zend_Ldap_node
*/
public function offsetGet($rdn) { }

/**
* Checks whether a given rdn exists.
* Implements ArrayAccess.
*
* @param string $rdn
* @return boolean
*/
public function offsetExists($rdn) { }

/**
* Does nothing.
* Implements ArrayAccess.
*
* @param string $name
* @return null
*/
public function offsetUnset($name) { } { }

/**
* Does nothing.
* Implements ArrayAccess.
*
* @param string $name
* @param mixed $value
* @return null
*/
public function offsetSet($name, $value) { } { }

/**
* Get all children as an array
*
* @return array
*/
public function toArray() { }
}
{code}
{card}
{card:label=Zend_Ldap_Node_Collection}
{code}
/**
* Zend_Ldap_Node_Collection provides a collecion of nodes.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Node
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Node_Collection extends Zend_Ldap_Collection
{
/**
* Creates the data structure for the given entry data
*
* @param array $data
* @return Zend_Ldap_Node
*/
protected function _createEntry(array $data) { }

/**
* Return the child key (DN).
* Implements Iterator and RecursiveIterator
*
* @return string
*/
public function key() { }
}
{code}
{card}
{deck}

{deck:id=Node subpackage 2}
{card:label=Zend_Ldap_Node_RootDse}
{code}
/**
* Zend_Ldap_Node_ReadOnly provides a simple data-container for read-only nodes
* such as RootDSE and the Schema node.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Node
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Node_RootDse extends Zend_Ldap_Node_Abstract
{
/**
* Factory method to create the RootDSE.
*
* @param Zend_Ldap $ldap
* @return Zend_Ldap_Node_RootDse
* @throws Zend_Ldap_Exception
*/
public static function load(Zend_Ldap $ldap) { }

/**
* Gets the configContext.
*
* @return string|null
*/
public function getConfigContext() { }

/**
* Gets the monitorContext.
*
* @return string|null
*/
public function getMonitorContext() { }

/**
* Gets the namingContexts.
*
* @return array
*/
public function getNamingContexts() { }

/**
* Determines if the extension is supported
*
* @param string|array $oids oid(s) to check
* @return boolean
*/
public function supportsExtension($oids) { }

/**
* Determines if the version is supported
*
* @param string|int|array $versions version(s) to check
* @return boolean
*/
public function supportsVersion($versions) { }

/**
* Determines if the control is supported
*
* @param string|array $oids control oid(s) to check
* @return boolean
*/
public function supportsControl($oids) { }

/**
* Determines if the sasl mechanism is supported
*
* @param string|array $mechlist SASL mechanisms to check
* @return boolean
*/
public function supportsSaslMechanism($mechlist) { }

/**
* Determines if the feature is supported
*
* @param string|array $oids feature oid(s) to check
* @return boolean
*/
public function supportsFeature($oids) { }
}
{code}
{card}
{card:label=Zend_Ldap_Node_Schema}
{code}
/**
* Zend_Ldap_Node_ReadOnly provides a simple data-container for read-only nodes
* such as RootDSE and the Schema node.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Node
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Node_Schema extends Zend_Ldap_Node_Abstract
{
/**
* Factory method to create the Schema node.
*
* @param Zend_Ldap $ldap
* @return Zend_Ldap_Node_Schema
* @throws Zend_Ldap_Exception
*/
public static function load(Zend_Ldap $ldap) { }

/**
* Parses the schema
*
* @return Zend_Ldap_Node_Schema *Provides a fluid interface*
*/
public function _parseSchema() { }

/**
* Gets the attribute Types
*
* @return array()
*/
public function getAttributeTypes() { }

/**
* Gets the LDAP syntaxes
*
* @return array()
*/
public function getLdapSyntaxes() { }

/**
* Gets the matching rules
*
* @return array()
*/
public function getMatchingRules() { }

/**
* Gets the matching rule use
*
* @return array()
*/
public function getMatchingRuleUse() { }

/**
* Gets the object classes
*
* @return array()
*/
public function getObjectClasses() { }

/**
* Loads the attribute Types
*
* @return void
*/
protected function _loadAttributeTypes() { }

/**
* Parses an attributeType value
*
* @param string $value
* @return array
*/
protected function _parseAttributeType($value) { }

/**
* Loads the LDAP syntaxes
*
* @return void
*/
protected function _loadLdapSyntaxes() { }

/**
* Parses an ldapSyntaxes value
*
* @param string $value
* @return array
*/
protected function _parseLdapSyntax($value) { }

/**
* Loads the matching rules
*
* @return void
*/
protected function _loadMatchingRules() { }

/**
* Parses an matchingRules value
*
* @param string $value
* @return array
*/
protected function _parseMatchingRule($value) { }

/**
* Loads the matching rule use
*
* @return void
*/
protected function _loadMatchingRuleUse() { }

/**
* Parses an matchingRuleUse value
*
* @param string $value
* @return array
*/
protected function _parseMatchingRuleUse($value) { }

/**
* Loads the object classes
*
* @return void
*/
protected function _loadObjectClasses() { }

/**
* Parses an objectClasses value
*
* @param string $value
* @return array
*/
protected function _parseObjectClass($value) { }

/**
* Ensures that a name element is present and that it is single-values.
*
* @param array $data
*/
protected function _ensureNameAttribute(array &$data) { }

/**
* Parse the given tokens into a data structure
*
* @param array $data
* @param array $tokens
* @return void
*/
protected function _parseLdapSchemaSyntax(array &$data, array $tokens) { }

/**
* Tokenizes the given value into an array
*
* @param string $value string
* @return array tokens
*/
protected function _tokenizeString($value) { }
}
{code}
{card}
{deck}

||LDIF subpackage||
{deck:id=LDIF subpackage}
{card:label=Zend_Ldap_Ldif_Encoder}
{code}
/**
* Zend_Ldap_Ldif_Encoder provides methods to encode and decode LDAP data into/from LDIF.
*
* @category Zend
* @package Zend_Ldap
* @subpackage Ldif
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Ldap_Ldif_Encoder
{
/**
* Constructor.
*
* @param array $options Additional options used during encoding
* @return void
*/
protected function __construct(array $options = array()) { }

/**
* Decodes the string $string into an array of LDIF items
*
* @param string $string
* @return array
*/
public static function decode($string) { }

/**
* Decodes the string $string into an array of LDIF items
*
* @param string $string
* @return array
*/
protected function _decode($string) { }

/**
* Pushes a decoded attribute to the stack
*
* @param array $attribute
* @param array $entry
*/
protected function _pushAttribute(array $attribute, array &$entry) { }

/**
* Encode $value into a LDIF representation
*
* @param mixed $value The value to be encoded
* @param array $options Additional options used during encoding
* @return string The encoded value
*/
public static function encode($value, array $options = array()) { }

/**
* Recursive driver which determines the type of value to be encoded
* and then dispatches to the appropriate method.
*
* @param $value mixed The value to be encoded
* @return string Encoded value
*/
protected function _encode($value) { }

/**
* Encodes $string according to RFC2849
*
* @link http://www.faqs.org/rfcs/rfc2849.html
*
* @param string $string
* @param boolen $base64
* @return string
*/
protected function _encodeString($string, &$base64 = null) { }

/**
* Encodes an attribute with $name and $value according to RFC2849
*
* @link http://www.faqs.org/rfcs/rfc2849.html
*
* @param string $name
* @param array|string $value
* @return string
*/
protected function _encodeAttribute($name, $value) { }

/**
* Encodes a collection of attributes according to RFC2849
*
* @link http://www.faqs.org/rfcs/rfc2849.html
*
* @param array $attributes
* @return string
*/
protected function _encodeAttributes(array $attributes) { }
}
{code}
{card}
{deck}
{zone-data}

{zone-template-instance}]]></ac:plain-text-body></ac:macro>