Permalink
Browse files

[Zen\Ldap] [Documentation] Update documentation

* Update classnames
* Fix DTD issues
  • Loading branch information...
1 parent 073395a commit e38ebc6004e0aaf1e21931d32745cc5c67a898e0 @Maks3w Maks3w committed Apr 9, 2012
Showing with 14 additions and 10 deletions.
  1. +6 −5 Dn.php
  2. +8 −5 Ldap.php
View
11 Dn.php
@@ -453,6 +453,7 @@ public static function setDefaultCaseFold($caseFold)
* Sanitizes the case fold
*
* @param string $caseFold
+ * @param string $default
* @return string
*/
protected static function sanitizeCaseFold($caseFold, $default)
@@ -693,7 +694,7 @@ public static function checkDn(
* This method supports the creation of multi-valued RDNs
* $part must contain an even number of elemets.
*
- * @param array $attribute
+ * @param array $part
* @param string $caseFold
* @return string
* @throws Exception\LdapException
@@ -709,6 +710,7 @@ public static function implodeRdn(array $part, $caseFold = null)
$rdnParts[$keyId] = implode('=', array($key, $value));
}
ksort($rdnParts, SORT_STRING);
+
return implode('+', $rdnParts);
}
@@ -752,18 +754,17 @@ public static function isChildOf($childDn, $parentDn)
try {
$keys = array();
$vals = array();
- if ($childDn instanceof DN) {
+ if ($childDn instanceof Dn) {
$cdn = $childDn->toArray(DN::ATTR_CASEFOLD_LOWER);
} else {
$cdn = self::explodeDn($childDn, $keys, $vals, DN::ATTR_CASEFOLD_LOWER);
}
- if ($parentDn instanceof DN) {
+ if ($parentDn instanceof Dn) {
$pdn = $parentDn->toArray(DN::ATTR_CASEFOLD_LOWER);
} else {
$pdn = self::explodeDn($parentDn, $keys, $vals, DN::ATTR_CASEFOLD_LOWER);
}
- }
- catch (Exception\LdapException $e) {
+ } catch (Exception\LdapException $e) {
return false;
}
View
@@ -223,7 +223,7 @@ public function getBoundUser()
* networkTimeout
*
* @param array|Traversable $options Options used in connecting, binding, etc.
- * @return Ldap Provides a fluent interface
+ * @return Ldap\Ldap Provides a fluent interface
* @throws Exception\LdapException
*/
public function setOptions($options)
@@ -452,6 +452,7 @@ protected function getNetworkTimeout()
}
/**
+ * @param strint $acctname
* @return string The LDAP search filter for matching directory accounts
*/
protected function getAccountFilter($acctname)
@@ -543,7 +544,7 @@ protected function isPossibleAuthority($dname)
/**
* @param string $acctname The name to canonicalize
- * @param int $type The desired form of canonicalization
+ * @param int $form The desired form of canonicalization
* @return string The canonicalized name in the desired form
* @throws Exception\LdapException
*/
@@ -597,8 +598,9 @@ 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
+ * @param string $acctname
+ * @param array $attrs An array of names of desired attributes
+ * @return array An array of the attributes representing the account
* @throws Exception\LdapException
*/
protected function getAccount($acctname, array $attrs = null)
@@ -622,6 +624,7 @@ protected function getAccount($acctname, array $attrs = null)
if ($count === 1) {
$acct = $accounts->getFirst();
$accounts->close();
+
return $acct;
} else {
if ($count === 0) {
@@ -1047,7 +1050,7 @@ public function searchEntries(
* @param array $attributes
* @param boolean $throwOnNotFound
* @return array
- * @throws null|Exception\LdapException
+ * @throws Exception\LdapException
*/
public function getEntry($dn, array $attributes = array(), $throwOnNotFound = false)
{

0 comments on commit e38ebc6

Please sign in to comment.