OpenLdap.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * @see Zend_Ldap_Node_RootDse
  24. */
  25. require_once 'Zend/Ldap/Node/RootDse.php';
  26. /**
  27. * Zend_Ldap_Node_RootDse provides a simple data-container for the RootDSE node of
  28. * an OpenLDAP server.
  29. *
  30. * @category Zend
  31. * @package Zend_Ldap
  32. * @subpackage RootDSE
  33. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  34. * @license http://framework.zend.com/license/new-bsd New BSD License
  35. */
  36. class Zend_Ldap_Node_RootDse_OpenLdap extends Zend_Ldap_Node_RootDse
  37. {
  38. /**
  39. * Gets the configContext.
  40. *
  41. * @return string|null
  42. */
  43. public function getConfigContext()
  44. {
  45. return $this->getAttribute('configContext', 0);
  46. }
  47. /**
  48. * Gets the monitorContext.
  49. *
  50. * @return string|null
  51. */
  52. public function getMonitorContext()
  53. {
  54. return $this->getAttribute('monitorContext', 0);
  55. }
  56. /**
  57. * Determines if the control is supported
  58. *
  59. * @param string|array $oids control oid(s) to check
  60. * @return boolean
  61. */
  62. public function supportsControl($oids)
  63. {
  64. return $this->attributeHasValue('supportedControl', $oids);
  65. }
  66. /**
  67. * Determines if the extension is supported
  68. *
  69. * @param string|array $oids oid(s) to check
  70. * @return boolean
  71. */
  72. public function supportsExtension($oids)
  73. {
  74. return $this->attributeHasValue('supportedExtension', $oids);
  75. }
  76. /**
  77. * Determines if the feature is supported
  78. *
  79. * @param string|array $oids feature oid(s) to check
  80. * @return boolean
  81. */
  82. public function supportsFeature($oids)
  83. {
  84. return $this->attributeHasValue('supportedFeatures', $oids);
  85. }
  86. /**
  87. * Gets the server type
  88. *
  89. * @return int
  90. */
  91. public function getServerType()
  92. {
  93. return self::SERVER_TYPE_OPENLDAP;
  94. }
  95. }