Source for file RootDSE.php
Documentation is available at RootDSE.php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
* Getting the rootDSE entry of a LDAP server
* @author Jan Wagner <wagner@netsols.de>
* @license http://www.gnu.org/copyleft/lesser.html LGPL
* @version CVS $Id: RootDSE.php,v 1.2 2008/03/20 09:32:39 beni Exp $
* @link http://pear.php.net/package/Net_LDAP22/
* @var object Net_LDAP2_Entry
* @param Net_LDAP2_Entry &$entry Net_LDAP2_Entry object of the RootDSE
* Fetches a RootDSE object from an LDAP connection
* @param Net_LDAP2 $ldap Directory from which the RootDSE should be fetched
* @param array $attrs Array of attributes to search for
* @author Jan Wagner <wagner@netsols.de>
* @return Net_LDAP2_RootDSE|Net_LDAP2_Error
public static function fetch(&$ldap, $attrs = null )
return PEAR ::raiseError ("Unable to fetch Schema: Parameter \$ldap must be a Net_LDAP2 object!");
$attributes = array ('namingContexts',
'supportedSASLMechanisms',
$result = $ldap->search ('', '(objectClass=*)', array ('attributes' => $attributes, 'scope' => 'base'));
if (self ::isError ($result)) {
$entry = $result->shiftEntry ();
return PEAR ::raiseError ('Could not fetch RootDSE entry');
* Gets the requested attribute value
* Same usuage as {@link Net_LDAP2_Entry::getValue()}
* @param string $attr Attribute name
* @param array $options Array of options
* @return mixed Net_LDAP2_Error object or attribute values
* @see Net_LDAP2_Entry::get_value()
public function getValue($attr = '', $options = '')
* Alias function of getValue() for perl-ldap interface
* Determines if the extension is supported
* @param array $oids Array of oids to check
return $this->_checkAttr($oids, 'supportedExtension');
* Alias function of supportedExtension() for perl-ldap interface
* @see supportedExtension()
* Determines if the version is supported
* @param array $versions Versions to check
return $this->_checkAttr($versions, 'supportedLDAPVersion');
* Alias function of supportedVersion() for perl-ldap interface
* @see supportedVersion()
* Determines if the control is supported
* @param array $oids Control oids to check
return $this->_checkAttr($oids, 'supportedControl');
* Alias function of supportedControl() for perl-ldap interface
* @see supportedControl()
* Determines if the sasl mechanism is supported
* @param array $mechlist SASL mechanisms to check
return $this->_checkAttr($mechlist, 'supportedSASLMechanisms');
* Alias function of supportedSASLMechanism() for perl-ldap interface
* @see supportedSASLMechanism()
* Checks for existance of value in attribute
* @param array $values values to check
* @param string $attr attribute name
if (!is_array($values)) $values = array ($values);
foreach ($values as $value) {
Documentation generated on Mon, 11 Mar 2019 15:17:51 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|