Permalink
Browse files

changes to fullfil PCS

git-svn-id: http://svn.php.net/repository/pear/packages/Net_LDAP/trunk@144350 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
Jan Wagner
Jan Wagner committed Nov 14, 2003
1 parent 662317a commit b7d5e258dfe2a8a6ec72c4ae66dbe3937ee5aeb2
Showing with 314 additions and 248 deletions.
  1. +52 −39 LDAP/RootDSE.php
  2. +156 −142 LDAP/Schema.php
  3. +61 −33 LDAP/Search.php
  4. +45 −34 LDAP/Util.php
View
@@ -1,17 +1,29 @@
-<?PHP
-
-/**
- * Net_LDAP_RootDSE
- *
- * @package Net_LDAP
- * @author Jan Wagner <wagner@netsols.de>
- * @version $Id$
- */
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2003 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available through the world-wide-web at |
+// | http://www.php.net/license/2_02.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Jan Wagner <wagner@netsols.de> |
+// +----------------------------------------------------------------------+
+//
+// $Id$
/**
* Getting the rootDSE entry of a LDAP server
*
* @package Net_LDAP
+ * @author Jan Wagner <wagner@netsols.de>
+ * @version $Revision$
*/
class Net_LDAP_RootDSE extends PEAR
{
@@ -26,7 +38,7 @@ class Net_LDAP_RootDSE extends PEAR
*
* @param object Net_LDAP_Entry
*/
- function Net_LDAP_RootDSE( &$entry )
+ function Net_LDAP_RootDSE(&$entry)
{
$this->_entry = $entry;
}
@@ -37,14 +49,14 @@ function Net_LDAP_RootDSE( &$entry )
* Same usuage as Net_LDAP_Entry::get_value()
*
* @access public
- * @param string $attr Attribute name
- * @param array $options Array of options
- * @return mixed Ldap_Error object or attribute values
+ * @param string Attribute name
+ * @param array Array of options
+ * @return mixed Net_LDAP_Error object or attribute values
* @see Net_LDAP_Entry::get_value()
*/
- function getValue( $attr = '', $options = '' )
+ function getValue($attr = '', $options = '')
{
- return $this->_entry->get_value( $attr, $options );
+ return $this->_entry->get_value($attr, $options);
}
/**
@@ -55,19 +67,19 @@ function getValue( $attr = '', $options = '' )
function get_value()
{
$args = func_get_args();
- return call_user_func_array( array( &$this, 'getValue' ), $args );
- }
+ return call_user_func_array(array( &$this, 'getValue' ), $args);
+ }
/**
* Determines if the extension is supported
*
* @access public
- * @param array $oids array of oids to check
+ * @param array Array of oids to check
* @return boolean
*/
- function supportedExtension ( $oids )
+ function supportedExtension($oids)
{
- return $this->_check_attr( $oids, 'supportedExtension' );
+ return $this->_checkAttr($oids, 'supportedExtension');
}
/**
@@ -78,19 +90,19 @@ function supportedExtension ( $oids )
function supported_extension()
{
$args = func_get_args();
- return call_user_func_array( array( &$this, 'supportedExtension' ), $args );
+ return call_user_func_array(array( &$this, 'supportedExtension'), $args);
}
/**
* Determines if the version is supported
*
* @access public
- * @param array $versions versions to check
+ * @param array Versions to check
* @return boolean
*/
- function supportedVersion ( $versions )
+ function supportedVersion($versions)
{
- return $this->_check_attr( $versions, 'supportedLDAPVersion' );
+ return $this->_checkAttr($versions, 'supportedLDAPVersion');
}
/**
@@ -101,19 +113,19 @@ function supportedVersion ( $versions )
function supported_version()
{
$args = func_get_args();
- return call_user_func_array( array( &$this, 'supportedVersion' ), $args );
+ return call_user_func_array(array(&$this, 'supportedVersion'), $args);
}
/**
* Determines if the control is supported
*
* @access public
- * @param array $oids control oids to check
+ * @param array Control oids to check
* @return boolean
*/
- function supportedControl ( $oids )
+ function supportedControl($oids)
{
- return $this->_check_attr( $oids, 'supportedControl' );
+ return $this->_checkAttr($oids, 'supportedControl');
}
/**
@@ -124,19 +136,19 @@ function supportedControl ( $oids )
function supported_control()
{
$args = func_get_args();
- return call_user_func_array( array( &$this, 'supportedControl' ), $args );
+ return call_user_func_array(array(&$this, 'supportedControl' ), $args);
}
/**
* Determines if the sasl mechanism is supported
*
* @access public
- * @param array $mechlist sasl mechanisms to check
+ * @param array SASL mechanisms to check
* @return boolean
*/
- function supportedSASLMechanism ( $mechlist )
+ function supportedSASLMechanism($mechlist)
{
- return $this->_check_attr( $mechlist, 'supportedSASLMechanisms' );
+ return $this->_checkAttr($mechlist, 'supportedSASLMechanisms');
}
/**
@@ -147,7 +159,7 @@ function supportedSASLMechanism ( $mechlist )
function supported_sasl_mechanism()
{
$args = func_get_args();
- return call_user_func_array( array( &$this, 'supportedSASLMechanism' ), $args );
+ return call_user_func_array(array(&$this, 'supportedSASLMechanism'), $args);
}
/**
@@ -158,14 +170,15 @@ function supported_sasl_mechanism()
* @param attr $attr attribute name
* @return boolean
*/
- function _check_attr( $values, $attr )
+ function _checkAttr($values, $attr)
{
- if( !is_array( $values ) ) $values = array( $values );
+ if (!is_array($values)) $values = array($values);
- foreach( $values as $value ) {
- if( !@in_array( $value, $this->get_value( $attr ) ) ) return false;
- }
-
+ foreach ($values as $value) {
+ if (!@in_array($value, $this->get_value($attr))) {
+ return false;
+ }
+ }
return true;
}
}
Oops, something went wrong.

0 comments on commit b7d5e25

Please sign in to comment.