1 | <?php |
---|
2 | /** |
---|
3 | * Zend Framework |
---|
4 | * |
---|
5 | * LICENSE |
---|
6 | * |
---|
7 | * This source file is subject to the new BSD license that is bundled |
---|
8 | * with this package in the file LICENSE.txt. |
---|
9 | * It is also available through the world-wide-web at this URL: |
---|
10 | * http://framework.zend.com/license/new-bsd |
---|
11 | * If you did not receive a copy of the license and are unable to |
---|
12 | * obtain it through the world-wide-web, please send an email |
---|
13 | * to license@zend.com so we can send you a copy immediately. |
---|
14 | * |
---|
15 | * @category Zend |
---|
16 | * @package Zend_Ldap |
---|
17 | * @subpackage RootDSE |
---|
18 | * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
---|
19 | * @license http://framework.zend.com/license/new-bsd New BSD License |
---|
20 | * @version $Id: ActiveDirectory.php 20096 2010-01-06 02:05:09Z bkarwin $ |
---|
21 | */ |
---|
22 | |
---|
23 | /** |
---|
24 | * @see Zend_Ldap_Node_RootDse |
---|
25 | */ |
---|
26 | require_once 'Zend/Ldap/Node/RootDse.php'; |
---|
27 | |
---|
28 | /** |
---|
29 | * Zend_Ldap_Node_RootDse provides a simple data-container for the RootDSE node of |
---|
30 | * an Active Directory server. |
---|
31 | * |
---|
32 | * @category Zend |
---|
33 | * @package Zend_Ldap |
---|
34 | * @subpackage RootDSE |
---|
35 | * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
---|
36 | * @license http://framework.zend.com/license/new-bsd New BSD License |
---|
37 | */ |
---|
38 | class Zend_Ldap_Node_RootDse_ActiveDirectory extends Zend_Ldap_Node_RootDse |
---|
39 | { |
---|
40 | /** |
---|
41 | * Gets the configurationNamingContext. |
---|
42 | * |
---|
43 | * @return string|null |
---|
44 | */ |
---|
45 | public function getConfigurationNamingContext() |
---|
46 | { |
---|
47 | return $this->getAttribute('configurationNamingContext', 0); |
---|
48 | } |
---|
49 | |
---|
50 | /** |
---|
51 | * Gets the currentTime. |
---|
52 | * |
---|
53 | * @return string|null |
---|
54 | */ |
---|
55 | public function getCurrentTime() |
---|
56 | { |
---|
57 | return $this->getAttribute('currentTime', 0); |
---|
58 | } |
---|
59 | |
---|
60 | /** |
---|
61 | * Gets the defaultNamingContext. |
---|
62 | * |
---|
63 | * @return string|null |
---|
64 | */ |
---|
65 | public function getDefaultNamingContext() |
---|
66 | { |
---|
67 | return $this->getAttribute('defaultNamingContext', 0); |
---|
68 | } |
---|
69 | |
---|
70 | /** |
---|
71 | * Gets the dnsHostName. |
---|
72 | * |
---|
73 | * @return string|null |
---|
74 | */ |
---|
75 | public function getDnsHostName() |
---|
76 | { |
---|
77 | return $this->getAttribute('dnsHostName', 0); |
---|
78 | } |
---|
79 | |
---|
80 | /** |
---|
81 | * Gets the domainControllerFunctionality. |
---|
82 | * |
---|
83 | * @return string|null |
---|
84 | */ |
---|
85 | public function getDomainControllerFunctionality() |
---|
86 | { |
---|
87 | return $this->getAttribute('domainControllerFunctionality', 0); |
---|
88 | } |
---|
89 | |
---|
90 | /** |
---|
91 | * Gets the domainFunctionality. |
---|
92 | * |
---|
93 | * @return string|null |
---|
94 | */ |
---|
95 | public function getDomainFunctionality() |
---|
96 | { |
---|
97 | return $this->getAttribute('domainFunctionality', 0); |
---|
98 | } |
---|
99 | |
---|
100 | /** |
---|
101 | * Gets the dsServiceName. |
---|
102 | * |
---|
103 | * @return string|null |
---|
104 | */ |
---|
105 | public function getDsServiceName() |
---|
106 | { |
---|
107 | return $this->getAttribute('dsServiceName', 0); |
---|
108 | } |
---|
109 | |
---|
110 | /** |
---|
111 | * Gets the forestFunctionality. |
---|
112 | * |
---|
113 | * @return string|null |
---|
114 | */ |
---|
115 | public function getForestFunctionality() |
---|
116 | { |
---|
117 | return $this->getAttribute('forestFunctionality', 0); |
---|
118 | } |
---|
119 | |
---|
120 | /** |
---|
121 | * Gets the highestCommittedUSN. |
---|
122 | * |
---|
123 | * @return string|null |
---|
124 | */ |
---|
125 | public function getHighestCommittedUSN() |
---|
126 | { |
---|
127 | return $this->getAttribute('highestCommittedUSN', 0); |
---|
128 | } |
---|
129 | |
---|
130 | /** |
---|
131 | * Gets the isGlobalCatalogReady. |
---|
132 | * |
---|
133 | * @return string|null |
---|
134 | */ |
---|
135 | public function getIsGlobalCatalogReady() |
---|
136 | { |
---|
137 | return $this->getAttribute('isGlobalCatalogReady', 0); |
---|
138 | } |
---|
139 | |
---|
140 | /** |
---|
141 | * Gets the isSynchronized. |
---|
142 | * |
---|
143 | * @return string|null |
---|
144 | */ |
---|
145 | public function getIsSynchronized() |
---|
146 | { |
---|
147 | return $this->getAttribute('isSynchronized', 0); |
---|
148 | } |
---|
149 | |
---|
150 | /** |
---|
151 | * Gets the ldapServiceName. |
---|
152 | * |
---|
153 | * @return string|null |
---|
154 | */ |
---|
155 | public function getLdapServiceName() |
---|
156 | { |
---|
157 | return $this->getAttribute('ldapServiceName', 0); |
---|
158 | } |
---|
159 | |
---|
160 | /** |
---|
161 | * Gets the rootDomainNamingContext. |
---|
162 | * |
---|
163 | * @return string|null |
---|
164 | */ |
---|
165 | public function getRootDomainNamingContext() |
---|
166 | { |
---|
167 | return $this->getAttribute('rootDomainNamingContext', 0); |
---|
168 | } |
---|
169 | |
---|
170 | /** |
---|
171 | * Gets the schemaNamingContext. |
---|
172 | * |
---|
173 | * @return string|null |
---|
174 | */ |
---|
175 | public function getSchemaNamingContext() |
---|
176 | { |
---|
177 | return $this->getAttribute('schemaNamingContext', 0); |
---|
178 | } |
---|
179 | |
---|
180 | /** |
---|
181 | * Gets the serverName. |
---|
182 | * |
---|
183 | * @return string|null |
---|
184 | */ |
---|
185 | public function getServerName() |
---|
186 | { |
---|
187 | return $this->getAttribute('serverName', 0); |
---|
188 | } |
---|
189 | |
---|
190 | /** |
---|
191 | * Determines if the capability is supported |
---|
192 | * |
---|
193 | * @param string|string|array $oids capability(s) to check |
---|
194 | * @return boolean |
---|
195 | */ |
---|
196 | public function supportsCapability($oids) |
---|
197 | { |
---|
198 | return $this->attributeHasValue('supportedCapabilities', $oids); |
---|
199 | } |
---|
200 | |
---|
201 | /** |
---|
202 | * Determines if the control is supported |
---|
203 | * |
---|
204 | * @param string|array $oids control oid(s) to check |
---|
205 | * @return boolean |
---|
206 | */ |
---|
207 | public function supportsControl($oids) |
---|
208 | { |
---|
209 | return $this->attributeHasValue('supportedControl', $oids); |
---|
210 | } |
---|
211 | |
---|
212 | /** |
---|
213 | * Determines if the version is supported |
---|
214 | * |
---|
215 | * @param string|array $policies policy(s) to check |
---|
216 | * @return boolean |
---|
217 | */ |
---|
218 | public function supportsPolicy($policies) |
---|
219 | { |
---|
220 | return $this->attributeHasValue('supportedLDAPPolicies', $policies); |
---|
221 | } |
---|
222 | |
---|
223 | /** |
---|
224 | * Gets the server type |
---|
225 | * |
---|
226 | * @return int |
---|
227 | */ |
---|
228 | public function getServerType() |
---|
229 | { |
---|
230 | return self::SERVER_TYPE_ACTIVEDIRECTORY; |
---|
231 | } |
---|
232 | |
---|
233 | /** |
---|
234 | * Returns the schema DN |
---|
235 | * |
---|
236 | * @return Zend_Ldap_Dn |
---|
237 | */ |
---|
238 | public function getSchemaDn() |
---|
239 | { |
---|
240 | $schemaDn = $this->getSchemaNamingContext(); |
---|
241 | /** |
---|
242 | * @see Zend_Ldap_Dn |
---|
243 | */ |
---|
244 | require_once 'Zend/Ldap/Dn.php'; |
---|
245 | return Zend_Ldap_Dn::fromString($schemaDn); |
---|
246 | } |
---|
247 | } |
---|