getEntry($dn, array('*', '+'), true); if (isset($data['domainfunctionality'])) { /** * @see Zend_Ldap_Node_RootDse_ActiveDirectory */ #require_once 'Zend/Ldap/Node/RootDse/ActiveDirectory.php'; return new Zend_Ldap_Node_RootDse_ActiveDirectory($dn, $data); } else if (isset($data['dsaname'])) { /** * @see Zend_Ldap_Node_RootDse_ActiveDirectory */ #require_once 'Zend/Ldap/Node/RootDse/eDirectory.php'; return new Zend_Ldap_Node_RootDse_eDirectory($dn, $data); } else if (isset($data['structuralobjectclass']) && $data['structuralobjectclass'][0] === 'OpenLDAProotDSE') { /** * @see Zend_Ldap_Node_RootDse_OpenLdap */ #require_once 'Zend/Ldap/Node/RootDse/OpenLdap.php'; return new Zend_Ldap_Node_RootDse_OpenLdap($dn, $data); } else { return new self($dn, $data); } } /** * Constructor. * * Constructor is protected to enforce the use of factory methods. * * @param Zend_Ldap_Dn $dn * @param array $data */ protected function __construct(Zend_Ldap_Dn $dn, array $data) { parent::__construct($dn, $data, true); } /** * Gets the namingContexts. * * @return array */ public function getNamingContexts() { return $this->getAttribute('namingContexts', null); } /** * Gets the subschemaSubentry. * * @return string|null */ public function getSubschemaSubentry() { return $this->getAttribute('subschemaSubentry', 0); } /** * Determines if the version is supported * * @param string|int|array $versions version(s) to check * @return boolean */ public function supportsVersion($versions) { return $this->attributeHasValue('supportedLDAPVersion', $versions); } /** * Determines if the sasl mechanism is supported * * @param string|array $mechlist SASL mechanisms to check * @return boolean */ public function supportsSaslMechanism($mechlist) { return $this->attributeHasValue('supportedSASLMechanisms', $mechlist); } /** * Gets the server type * * @return int */ public function getServerType() { return self::SERVER_TYPE_GENERIC; } /** * Returns the schema DN * * @return Zend_Ldap_Dn */ public function getSchemaDn() { $schemaDn = $this->getSubschemaSubentry(); /** * @see Zend_Ldap_Dn */ #require_once 'Zend/Ldap/Dn.php'; return Zend_Ldap_Dn::fromString($schemaDn); } }