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 OpenLDAP 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_OpenLdap extends Zend_Ldap_Node_RootDse
0039 {
0040     /**
0041      * Gets the configContext.
0042      *
0043      * @return string|null
0044      */
0045     public function getConfigContext()
0046     {
0047         return $this->getAttribute('configContext', 0);
0048     }
0049 
0050     /**
0051      * Gets the monitorContext.
0052      *
0053      * @return string|null
0054      */
0055     public function getMonitorContext()
0056     {
0057         return $this->getAttribute('monitorContext', 0);
0058     }
0059 
0060     /**
0061      * Determines if the control is supported
0062      *
0063      * @param  string|array $oids control oid(s) to check
0064      * @return boolean
0065      */
0066     public function supportsControl($oids)
0067     {
0068         return $this->attributeHasValue('supportedControl', $oids);
0069     }
0070 
0071     /**
0072      * Determines if the extension is supported
0073      *
0074      * @param  string|array $oids oid(s) to check
0075      * @return boolean
0076      */
0077     public function supportsExtension($oids)
0078     {
0079         return $this->attributeHasValue('supportedExtension', $oids);
0080     }
0081 
0082     /**
0083      * Determines if the feature is supported
0084      *
0085      * @param  string|array $oids feature oid(s) to check
0086      * @return boolean
0087      */
0088     public function supportsFeature($oids)
0089     {
0090         return $this->attributeHasValue('supportedFeatures', $oids);
0091     }
0092 
0093     /**
0094      * Gets the server type
0095      *
0096      * @return int
0097      */
0098     public function getServerType()
0099     {
0100         return self::SERVER_TYPE_OPENLDAP;
0101     }
0102 }