File indexing completed on 2025-01-26 05:29:38
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Ldap 0017 * @subpackage RootDSE 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 /** 0024 * @see Zend_Ldap_Node_RootDse 0025 */ 0026 // require_once 'Zend/Ldap/Node/RootDse.php'; 0027 0028 /** 0029 * Zend_Ldap_Node_RootDse provides a simple data-container for the RootDSE node of 0030 * an Active Directory server. 0031 * 0032 * @category Zend 0033 * @package Zend_Ldap 0034 * @subpackage RootDSE 0035 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0036 * @license http://framework.zend.com/license/new-bsd New BSD License 0037 */ 0038 class Zend_Ldap_Node_RootDse_ActiveDirectory extends Zend_Ldap_Node_RootDse 0039 { 0040 /** 0041 * Gets the configurationNamingContext. 0042 * 0043 * @return string|null 0044 */ 0045 public function getConfigurationNamingContext() 0046 { 0047 return $this->getAttribute('configurationNamingContext', 0); 0048 } 0049 0050 /** 0051 * Gets the currentTime. 0052 * 0053 * @return string|null 0054 */ 0055 public function getCurrentTime() 0056 { 0057 return $this->getAttribute('currentTime', 0); 0058 } 0059 0060 /** 0061 * Gets the defaultNamingContext. 0062 * 0063 * @return string|null 0064 */ 0065 public function getDefaultNamingContext() 0066 { 0067 return $this->getAttribute('defaultNamingContext', 0); 0068 } 0069 0070 /** 0071 * Gets the dnsHostName. 0072 * 0073 * @return string|null 0074 */ 0075 public function getDnsHostName() 0076 { 0077 return $this->getAttribute('dnsHostName', 0); 0078 } 0079 0080 /** 0081 * Gets the domainControllerFunctionality. 0082 * 0083 * @return string|null 0084 */ 0085 public function getDomainControllerFunctionality() 0086 { 0087 return $this->getAttribute('domainControllerFunctionality', 0); 0088 } 0089 0090 /** 0091 * Gets the domainFunctionality. 0092 * 0093 * @return string|null 0094 */ 0095 public function getDomainFunctionality() 0096 { 0097 return $this->getAttribute('domainFunctionality', 0); 0098 } 0099 0100 /** 0101 * Gets the dsServiceName. 0102 * 0103 * @return string|null 0104 */ 0105 public function getDsServiceName() 0106 { 0107 return $this->getAttribute('dsServiceName', 0); 0108 } 0109 0110 /** 0111 * Gets the forestFunctionality. 0112 * 0113 * @return string|null 0114 */ 0115 public function getForestFunctionality() 0116 { 0117 return $this->getAttribute('forestFunctionality', 0); 0118 } 0119 0120 /** 0121 * Gets the highestCommittedUSN. 0122 * 0123 * @return string|null 0124 */ 0125 public function getHighestCommittedUSN() 0126 { 0127 return $this->getAttribute('highestCommittedUSN', 0); 0128 } 0129 0130 /** 0131 * Gets the isGlobalCatalogReady. 0132 * 0133 * @return string|null 0134 */ 0135 public function getIsGlobalCatalogReady() 0136 { 0137 return $this->getAttribute('isGlobalCatalogReady', 0); 0138 } 0139 0140 /** 0141 * Gets the isSynchronized. 0142 * 0143 * @return string|null 0144 */ 0145 public function getIsSynchronized() 0146 { 0147 return $this->getAttribute('isSynchronized', 0); 0148 } 0149 0150 /** 0151 * Gets the ldapServiceName. 0152 * 0153 * @return string|null 0154 */ 0155 public function getLdapServiceName() 0156 { 0157 return $this->getAttribute('ldapServiceName', 0); 0158 } 0159 0160 /** 0161 * Gets the rootDomainNamingContext. 0162 * 0163 * @return string|null 0164 */ 0165 public function getRootDomainNamingContext() 0166 { 0167 return $this->getAttribute('rootDomainNamingContext', 0); 0168 } 0169 0170 /** 0171 * Gets the schemaNamingContext. 0172 * 0173 * @return string|null 0174 */ 0175 public function getSchemaNamingContext() 0176 { 0177 return $this->getAttribute('schemaNamingContext', 0); 0178 } 0179 0180 /** 0181 * Gets the serverName. 0182 * 0183 * @return string|null 0184 */ 0185 public function getServerName() 0186 { 0187 return $this->getAttribute('serverName', 0); 0188 } 0189 0190 /** 0191 * Determines if the capability is supported 0192 * 0193 * @param string|string|array $oids capability(s) to check 0194 * @return boolean 0195 */ 0196 public function supportsCapability($oids) 0197 { 0198 return $this->attributeHasValue('supportedCapabilities', $oids); 0199 } 0200 0201 /** 0202 * Determines if the control is supported 0203 * 0204 * @param string|array $oids control oid(s) to check 0205 * @return boolean 0206 */ 0207 public function supportsControl($oids) 0208 { 0209 return $this->attributeHasValue('supportedControl', $oids); 0210 } 0211 0212 /** 0213 * Determines if the version is supported 0214 * 0215 * @param string|array $policies policy(s) to check 0216 * @return boolean 0217 */ 0218 public function supportsPolicy($policies) 0219 { 0220 return $this->attributeHasValue('supportedLDAPPolicies', $policies); 0221 } 0222 0223 /** 0224 * Gets the server type 0225 * 0226 * @return int 0227 */ 0228 public function getServerType() 0229 { 0230 return self::SERVER_TYPE_ACTIVEDIRECTORY; 0231 } 0232 0233 /** 0234 * Returns the schema DN 0235 * 0236 * @return Zend_Ldap_Dn 0237 */ 0238 public function getSchemaDn() 0239 { 0240 $schemaDn = $this->getSchemaNamingContext(); 0241 /** 0242 * @see Zend_Ldap_Dn 0243 */ 0244 // require_once 'Zend/Ldap/Dn.php'; 0245 return Zend_Ldap_Dn::fromString($schemaDn); 0246 } 0247 }