PageRenderTime 41ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/php-bartlett-PHP-CompatInfo-2.5.0/PHP_CompatInfo-2.5.0/PHP/CompatInfo/Reference/ldap.php

#
PHP | 265 lines | 172 code | 13 blank | 80 comment | 32 complexity | 318722554480b7c564bd301061c7a6ad MD5 | raw file
Possible License(s): BSD-3-Clause
  1. <?php
  2. /**
  3. * Version informations about ldap extension
  4. *
  5. * PHP version 5
  6. *
  7. * @category PHP
  8. * @package PHP_CompatInfo
  9. * @author Laurent Laville <pear@laurent-laville.org>
  10. * @license http://www.opensource.org/licenses/bsd-license.php BSD License
  11. * @version SVN: $Id$
  12. * @link http://php5.laurent-laville.org/compatinfo/
  13. */
  14. /**
  15. * All interfaces, classes, functions, constants about ldap extension
  16. *
  17. * @category PHP
  18. * @package PHP_CompatInfo
  19. * @author Laurent Laville <pear@laurent-laville.org>
  20. * @license http://www.opensource.org/licenses/bsd-license.php BSD License
  21. * @version Release: 2.5.0
  22. * @link http://php5.laurent-laville.org/compatinfo/
  23. * @link http://www.php.net/manual/en/book.ldap.php
  24. */
  25. class PHP_CompatInfo_Reference_Ldap implements PHP_CompatInfo_Reference
  26. {
  27. /**
  28. * Gets all informations at once about:
  29. * extensions, interfaces, classes, functions, constants
  30. *
  31. * @param string $extension OPTIONAL
  32. * @param string $version OPTIONAL PHP version
  33. * (4 => only PHP4, 5 or null => PHP4 + PHP5)
  34. *
  35. * @return array
  36. */
  37. public function getAll($extension = null, $version = null)
  38. {
  39. $references = array(
  40. 'extensions' => $this->getExtensions($extension, $version),
  41. 'interfaces' => $this->getInterfaces($extension, $version),
  42. 'classes' => $this->getClasses($extension, $version),
  43. 'functions' => $this->getFunctions($extension, $version),
  44. 'constants' => $this->getConstants($extension, $version),
  45. );
  46. return $references;
  47. }
  48. /**
  49. * Gets informations about extensions
  50. *
  51. * @param string $extension OPTIONAL
  52. * @param string $version OPTIONAL PHP version
  53. * (4 => only PHP4, 5 or null => PHP4 + PHP5)
  54. *
  55. * @return array
  56. */
  57. public function getExtensions($extension = null, $version = null)
  58. {
  59. $extensions = array(
  60. 'ldap' => array('4.0.0', '', '')
  61. );
  62. return $extensions;
  63. }
  64. /**
  65. * Gets informations about interfaces
  66. *
  67. * @param string $extension OPTIONAL
  68. * @param string $version OPTIONAL PHP version
  69. * (4 => only PHP4, 5 or null => PHP4 + PHP5)
  70. *
  71. * @return array
  72. */
  73. public function getInterfaces($extension = null, $version = null)
  74. {
  75. $interfaces = array();
  76. if ((null == $version ) || ('4' == $version)) {
  77. $version4 = array(
  78. );
  79. $interfaces = array_merge(
  80. $interfaces,
  81. $version4
  82. );
  83. }
  84. if ((null == $version ) || ('5' == $version)) {
  85. $version5 = array(
  86. );
  87. $interfaces = array_merge(
  88. $interfaces,
  89. $version5
  90. );
  91. }
  92. return $interfaces;
  93. }
  94. /**
  95. * Gets informations about classes
  96. *
  97. * @param string $extension OPTIONAL
  98. * @param string $version OPTIONAL PHP version
  99. * (4 => only PHP4, 5 or null => PHP4 + PHP5)
  100. *
  101. * @return array
  102. */
  103. public function getClasses($extension = null, $version = null)
  104. {
  105. $classes = array();
  106. if ((null == $version ) || ('4' == $version)) {
  107. $version4 = array(
  108. );
  109. $classes = array_merge(
  110. $classes,
  111. $version4
  112. );
  113. }
  114. if ((null == $version ) || ('5' == $version)) {
  115. $version5 = array(
  116. );
  117. $classes = array_merge(
  118. $classes,
  119. $version5
  120. );
  121. }
  122. return $classes;
  123. }
  124. /**
  125. * Gets informations about functions
  126. *
  127. * @param string $extension OPTIONAL
  128. * @param string $version OPTIONAL PHP version
  129. * (4 => only PHP4, 5 or null => PHP4 + PHP5)
  130. *
  131. * @return array
  132. * @link http://www.php.net/manual/en/ref.ldap.php
  133. */
  134. public function getFunctions($extension = null, $version = null)
  135. {
  136. $functions = array();
  137. if ((null == $version ) || ('4' == $version)) {
  138. $version4 = array(
  139. 'ldap_add' => array('4.0.0', ''),
  140. 'ldap_bind' => array('4.0.0', ''),
  141. 'ldap_close' => array('4.0.0', ''),
  142. 'ldap_compare' => array('4.0.2', ''),
  143. 'ldap_connect' => array('4.0.0', ''),
  144. 'ldap_count_entries' => array('4.0.0', ''),
  145. 'ldap_delete' => array('4.0.0', ''),
  146. 'ldap_dn2ufn' => array('4.0.0', ''),
  147. 'ldap_err2str' => array('4.0.0', ''),
  148. 'ldap_errno' => array('4.0.0', ''),
  149. 'ldap_error' => array('4.0.0', ''),
  150. 'ldap_explode_dn' => array('4.0.0', ''),
  151. 'ldap_first_attribute' => array('4.0.0', ''),
  152. 'ldap_first_entry' => array('4.0.0', ''),
  153. 'ldap_first_reference' => array('4.0.5', ''),
  154. 'ldap_free_result' => array('4.0.0', ''),
  155. 'ldap_get_attributes' => array('4.0.0', ''),
  156. 'ldap_get_dn' => array('4.0.0', ''),
  157. 'ldap_get_entries' => array('4.0.0', ''),
  158. 'ldap_get_option' => array('4.0.4', ''),
  159. 'ldap_get_values' => array('4.0.0', ''),
  160. 'ldap_get_values_len' => array('4.0.0', ''),
  161. 'ldap_list' => array('4.0.0', ''),
  162. 'ldap_mod_add' => array('4.0.0', ''),
  163. 'ldap_mod_del' => array('4.0.0', ''),
  164. 'ldap_mod_replace' => array('4.0.0', ''),
  165. 'ldap_modify' => array('4.0.0', ''),
  166. 'ldap_next_attribute' => array('4.0.0', ''),
  167. 'ldap_next_entry' => array('4.0.0', ''),
  168. 'ldap_next_reference' => array('4.0.5', ''),
  169. 'ldap_parse_reference' => array('4.0.5', ''),
  170. 'ldap_parse_result' => array('4.0.5', ''),
  171. 'ldap_read' => array('4.0.0', '', '4.0.0, 4.0.0, 4.0.0, 4.0.0, 4.0.2, 4.0.2, 4.0.2, 4.0.2'),
  172. 'ldap_rename' => array('4.0.5', ''),
  173. 'ldap_search' => array('4.0.0', '', '4.0.0, 4.0.0, 4.0.0, 4.0.0, 4.0.2, 4.0.2, 4.0.2, 4.0.2'),
  174. 'ldap_set_rebind_proc' => array('4.2.0', ''),
  175. 'ldap_set_option' => array('4.0.4', ''),
  176. 'ldap_sort' => array('4.2.0', ''),
  177. 'ldap_start_tls' => array('4.2.0', ''),
  178. 'ldap_unbind' => array('4.0.0', ''),
  179. );
  180. $functions = array_merge(
  181. $functions,
  182. $version4
  183. );
  184. }
  185. if ((null == $version ) || ('5' == $version)) {
  186. $version5 = array(
  187. 'ldap_sasl_bind' => array('5.0.0', ''),
  188. 'ldap_control_paged_result' => array('5.4.0', ''),
  189. 'ldap_control_paged_result_response'
  190. => array('5.4.0', ''),
  191. );
  192. $functions = array_merge(
  193. $functions,
  194. $version5
  195. );
  196. }
  197. return $functions;
  198. }
  199. /**
  200. * Gets informations about constants
  201. *
  202. * @param string $extension OPTIONAL
  203. * @param string $version OPTIONAL PHP version
  204. * (4 => only PHP4, 5 or null => PHP4 + PHP5)
  205. *
  206. * @return array
  207. * @link http://www.php.net/manual/en/ldap.constants.php
  208. */
  209. public function getConstants($extension = null, $version = null)
  210. {
  211. $constants = array();
  212. if ((null == $version ) || ('4' == $version)) {
  213. $version4 = array(
  214. 'LDAP_DEREF_ALWAYS' => array('4.0.0', ''),
  215. 'LDAP_DEREF_FINDING' => array('4.0.0', ''),
  216. 'LDAP_DEREF_NEVER' => array('4.0.0', ''),
  217. 'LDAP_DEREF_SEARCHING' => array('4.0.0', ''),
  218. 'LDAP_OPT_CLIENT_CONTROLS' => array('4.0.0', ''),
  219. 'LDAP_OPT_DEBUG_LEVEL' => array('4.0.0', ''),
  220. 'LDAP_OPT_DEREF' => array('4.0.0', ''),
  221. 'LDAP_OPT_ERROR_NUMBER' => array('4.0.0', ''),
  222. 'LDAP_OPT_ERROR_STRING' => array('4.0.0', ''),
  223. 'LDAP_OPT_HOST_NAME' => array('4.0.0', ''),
  224. 'LDAP_OPT_MATCHED_DN' => array('4.0.0', ''),
  225. 'LDAP_OPT_PROTOCOL_VERSION' => array('4.0.0', ''),
  226. 'LDAP_OPT_REFERRALS' => array('4.0.0', ''),
  227. 'LDAP_OPT_RESTART' => array('4.0.0', ''),
  228. 'LDAP_OPT_SERVER_CONTROLS' => array('4.0.0', ''),
  229. 'LDAP_OPT_SIZELIMIT' => array('4.0.0', ''),
  230. 'LDAP_OPT_TIMELIMIT' => array('4.0.0', ''),
  231. 'LDAP_OPT_X_SASL_AUTHCID' => array('4.0.0', ''),
  232. 'LDAP_OPT_X_SASL_AUTHZID' => array('4.0.0', ''),
  233. 'LDAP_OPT_X_SASL_MECH' => array('4.0.0', ''),
  234. 'LDAP_OPT_X_SASL_REALM' => array('4.0.0', ''),
  235. );
  236. $constants = array_merge(
  237. $constants,
  238. $version4
  239. );
  240. }
  241. if ((null == $version ) || ('5' == $version)) {
  242. $version5 = array(
  243. 'LDAP_OPT_NETWORK_TIMEOUT' => array('5.3.0', ''),
  244. );
  245. $constants = array_merge(
  246. $constants,
  247. $version5
  248. );
  249. }
  250. return $constants;
  251. }
  252. }