Update Horde_Ldap_Util method names.
authorJan Schneider <jan@horde.org>
Fri, 17 Sep 2010 11:29:59 +0000 (13:29 +0200)
committerJan Schneider <jan@horde.org>
Fri, 17 Sep 2010 12:29:18 +0000 (14:29 +0200)
framework/Kolab_Server/lib/Horde/Kolab/Server/Connection/Mock/Ldap.php
framework/Kolab_Server/lib/Horde/Kolab/Server/Ldap.php
framework/Kolab_Server/test/Horde/Kolab/Server/Integration/MockTest.php
framework/Kolab_Server/test/Horde/Kolab/Server/Integration/PersonTest.php
framework/Ldap/lib/Horde/Ldap.php
framework/Ldap/lib/Horde/Ldap/Entry.php
framework/Ldap/lib/Horde/Ldap/Filter.php
framework/Ldap/lib/Horde/Ldap/Ldif.php
framework/Ldap/lib/Horde/Ldap/Util.php
framework/Ldap/test/Horde/Ldap/UtilTest.php

index 18b921e..1b74f72 100644 (file)
@@ -257,7 +257,7 @@ class Horde_Kolab_Server_Connection_Mock_Ldap
                     } else {
                         $result['att'] = $filter_parts[0];
                         $result['log'] = $filter_parts[1];
-                        $val = Horde_Ldap_Util::unescape_filter_value($filter_parts[2]);
+                        $val = Horde_Ldap_Util::unescapeFilterValue($filter_parts[2]);
                         $result['val'] = $val[0];
                         return $result;
                     }
index ea33de5..fd6c71a 100644 (file)
@@ -330,7 +330,7 @@ implements Horde_Kolab_Server_Interface
     public function getParentGuid($guid)
     {
         try {
-            $base = Horde_Ldap_Util::ldap_explode_dn(
+            $base = Horde_Ldap_Util::explodeDN(
                 $guid,
                 array(
                     'casefold' => 'none',
@@ -339,7 +339,7 @@ implements Horde_Kolab_Server_Interface
                 )
             );
             $id = array_shift($base);
-            $parent = Horde_Ldap_Util::canonical_dn(
+            $parent = Horde_Ldap_Util::canonicalDN(
                 $base, array('casefold' => 'none')
             );
         } catch (Horde_Ldap_Exception $e) {
index 992d711..4f15872 100644 (file)
@@ -389,7 +389,7 @@ class Horde_Kolab_Server_Integration_MockTest extends Horde_Kolab_Server_Integra
     {
         foreach ($this->servers as $server) {
             $filter = '(&(objectClass=kolabGroupOfNames)(member='
-                . Horde_Ldap_Util::escape_filter_value('cn=The Administrator,dc=example,dc=org') . '))';
+                . Horde_Ldap_Util::escapeFilterValue('cn=The Administrator,dc=example,dc=org') . '))';
             $result = $server->search($filter, array());
             $this->assertTrue(!empty($result));
 
index 3a92d9f..fdaf0df 100644 (file)
@@ -160,8 +160,8 @@ class Horde_Kolab_Server_Integration_PersonTest extends Horde_Kolab_Server_Integ
                 $this->assertNoError($result);
                 $cn_result = $server->uidForCn($this->objects[$add]['Cn']);
                 $this->assertNoError($cn_result);
-                $dn_parts = Horde_Ldap_Util::ldap_explode_dn($cn_result, array('casefold' => 'lower'));
-                $dnpart = Horde_Ldap_Util::unescape_dn_value($dn_parts[0]);
+                $dn_parts = Horde_Ldap_Util::explodeDN($cn_result, array('casefold' => 'lower'));
+                $dnpart = Horde_Ldap_Util::unescapeDNValue($dn_parts[0]);
                 /**
                  * @todo: I currently do not really understand why the forward slash
                  * is not correctly converted back but I lack the time to analyse it
@@ -238,8 +238,8 @@ class Horde_Kolab_Server_Integration_PersonTest extends Horde_Kolab_Server_Integ
 
             $cn_result = $server->uidForCn($this->objects[5]['Cn'][0]);
             $this->assertNoError($cn_result);
-            $dn_parts = Horde_Ldap_Util::ldap_explode_dn($cn_result, array('casefold' => 'lower'));
-            $dnpart = Horde_Ldap_Util::unescape_dn_value($dn_parts[0]);
+            $dn_parts = Horde_Ldap_Util::explodeDN($cn_result, array('casefold' => 'lower'));
+            $dnpart = Horde_Ldap_Util::unescapeDNValue($dn_parts[0]);
             $this->assertContains('Cn' . '=' . $this->objects[5]['Cn'][0],
                                   $dnpart[0]);
         }
index 25c50f0..eda4b91 100644 (file)
@@ -987,16 +987,16 @@ class Horde_Ldap
         }
 
         /* Make dn relative to parent. */
-        $base = Horde_Ldap_Util::ldap_explode_dn($dn, array('casefold' => 'none', 'reverse' => false, 'onlyvalues' => false));
+        $base = Horde_Ldap_Util::explodeDN($dn, array('casefold' => 'none', 'reverse' => false, 'onlyvalues' => false));
 
         $entry_rdn = array_shift($base);
         if (is_array($entry_rdn)) {
             /* Maybe the dn consist of a multivalued RDN. We must
              * build the dn in this case because the $entry_rdn is an
              * array. */
-            $filter_dn = Horde_Ldap_Util::canonical_dn($entry_rdn);
+            $filter_dn = Horde_Ldap_Util::canonicalDN($entry_rdn);
         }
-        $base = Horde_Ldap_Util::canonical_dn($base);
+        $base = Horde_Ldap_Util::canonicalDN($base);
 
         $result = @ldap_list($this->_link, $base, $entry_rdn, array(), 1, 1);
         if (@ldap_count_entries($this->_link, $result)) {
index fb8387b..001fd8d 100644 (file)
@@ -238,7 +238,7 @@ class Horde_Ldap_Entry
      *
      * @todo expect utf-8 data.
      * Please note that special characters (eg german umlauts) should be encoded using utf8_encode().
-     * You may use {@link Horde_Ldap_Util::canonical_dn()} for properly encoding of the DN.
+     * You may use {@link Horde_Ldap_Util::canonicalDN()} for properly encoding of the DN.
      *
      * @param string $dn New distinguished name.
      *
@@ -659,15 +659,15 @@ class Horde_Ldap_Entry
                 throw new Horde_Ldap_Exception('Renaming/Moving an entry is only supported in LDAPv3');
             }
             /* Make DN relative to parent (needed for LDAP rename). */
-            $parent = Horde_Ldap_Util::ldap_explode_dn($this->_newdn, array('casefolding' => 'none', 'reverse' => false, 'onlyvalues' => false));
+            $parent = Horde_Ldap_Util::explodeDN($this->_newdn, array('casefolding' => 'none', 'reverse' => false, 'onlyvalues' => false));
             $child = array_shift($parent);
 
             /* Maybe the DN consist of a multivalued RDN, we must build the DN
              * in this case because the $child RDN is an array. */
             if (is_array($child)) {
-                $child = Horde_Ldap_Util::canonical_dn($child);
+                $child = Horde_Ldap_Util::canonicalDN($child);
             }
-            $parent = Horde_Ldap_Util::canonical_dn($parent);
+            $parent = Horde_Ldap_Util::canonicalDN($parent);
 
             /* Rename/move. */
             if (!@ldap_rename($link, $this->_dn, $child, $parent, true)) {
index de84c23..3e4850b 100644 (file)
@@ -106,7 +106,7 @@ class Horde_Ldap_Filter
      * If $escape is set to true then $value will be escaped. If set to false
      * then $value will be treaten as a raw filter value string.  You should
      * then escape it yourself using {@link
-     * Horde_Ldap_Util::escape_filter_value()}.
+     * Horde_Ldap_Util::escapeFilterValue()}.
      *
      * Examples:
      * <code>
@@ -134,7 +134,7 @@ class Horde_Ldap_Filter
                                   $escape = true)
     {
         if ($escape) {
-            $array = Horde_Ldap_Util::escape_filter_value(array($value));
+            $array = Horde_Ldap_Util::escapeFilterValue(array($value));
             $value = $array[0];
         }
 
@@ -385,7 +385,7 @@ class Horde_Ldap_Filter
         // [TODO]: Do we need to escape at all? what about *-chars user provide
         //         and that should remain special?  I think, those prevent
         //         escaping! We need to check against PERL Net::LDAP!
-        // $value_arr = Horde_Ldap_Util::escape_filter_value(array($filter_parts[2]));
+        // $value_arr = Horde_Ldap_Util::escapeFilterValue(array($filter_parts[2]));
         // $value     = $value_arr[0];
 
         return new Horde_Ldap_Filter(array('filter' => '(' . $filter_parts[0] . $filter_parts[1] . $filter_parts[2] . ')'));
index e90a87d..d401755 100644 (file)
@@ -120,7 +120,7 @@ class Horde_Ldap_Ldif
      *                      values:
      *                      - 'none':      No encoding.
      *                      - 'canonical': See {@link
-     *                                     Horde_Ldap_Util::canonical_dn()}.
+     *                                     Horde_Ldap_Util::canonicalDN()}.
      *                      - 'base64':    Use base64 (default).
      * - 'change' (boolean): Write entry changes to the LDIF file instead of
      *                       the entries itself. I.e. write LDAP operations
@@ -306,10 +306,10 @@ class Horde_Ldap_Ldif
             $this->_writeLine('changetype: delete');
         } elseif ($entry->willBeMoved()) {
             $this->_writeLine('changetype: modrdn');
-            $olddn     = Horde_Ldap_Util::ldap_explode_dn($entry->currentDN(), array('casefold' => 'none'));
+            $olddn     = Horde_Ldap_Util::explodeDN($entry->currentDN(), array('casefold' => 'none'));
             $oldrdn    = array_shift($olddn);
             $oldparent = implode(',', $olddn);
-            $newdn     = Horde_Ldap_Util::ldap_explode_dn($entry->dn(), array('casefold' => 'none'));
+            $newdn     = Horde_Ldap_Util::explodeDN($entry->dn(), array('casefold' => 'none'));
             $rdn       = array_shift($newdn);
             $parent    = implode(',', $newdn);
             $this->_writeLine('newrdn: ' . $rdn);
@@ -786,7 +786,7 @@ class Horde_Ldap_Ldif
         if ($this->_options['encode'] == 'base64') {
             $dn = $this->_convertDN($dn);
         } elseif ($this->_options['encode'] == 'canonical') {
-            $dn = Horde_Ldap_Util::canonical_dn($dn, array('casefold' => 'none'));
+            $dn = Horde_Ldap_Util::canonicalDN($dn, array('casefold' => 'none'));
         }
         $this->_writeLine($dn, 'Unable to write DN of entry ' . $this->_entrynum);
     }
index a222ef5..1a06fbf 100644 (file)
@@ -34,7 +34,7 @@ class Horde_Ldap_Util
      * [NOT IMPLEMENTED] DNs might also contain values, which are the bytes of
      * the BER encoding of the X.500 AttributeValue rather than some LDAP
      * string syntax. These values are hex-encoded and prefixed with a #. To
-     * distinguish such BER values, ldap_explode_dn uses references to the
+     * distinguish such BER values, explodeDN uses references to the
      * actual values, e.g. '1.3.6.1.4.1.1466.0=#04024869,DC=example,DC=com' is
      * exploded to:
      * <code>
@@ -73,7 +73,7 @@ class Horde_Ldap_Util
      *
      * @return array   Parts of the exploded DN.
      */
-    public static function ldap_explode_dn($dn, array $options = array())
+    public static function explodeDN($dn, array $options = array())
     {
         if (!isset($options['onlyvalues'])) {
             $options['onlyvalues'] = false;
@@ -86,20 +86,20 @@ class Horde_Ldap_Util
         }
 
         // Escaping of DN and stripping of "OID.".
-        $dn = self::canonical_dn($dn, array('casefold' => $options['casefold']));
+        $dn = self::canonicalDN($dn, array('casefold' => $options['casefold']));
 
         // Splitting the DN.
         $dn_array = preg_split('/(?<=[^\\\\]),/', $dn);
 
         // Clear wrong splitting (possibly we have split too much).
         // Not clear, if this is neccessary here:
-        //$dn_array = self::_correct_dn_splitting($dn_array, ',');
+        //$dn_array = self::_correctDNSplitting($dn_array, ',');
 
         // Construct subarrays for multivalued RDNs and unescape DN value, also
         // convert to output format and apply casefolding.
         foreach ($dn_array as $key => $value) {
-            $value_u = self::unescape_dn_value($value);
-            $rdns    = self::split_rdn_multival($value_u[0]);
+            $value_u = self::unescapeDNValue($value);
+            $rdns    = self::splitRDNMultivalue($value_u[0]);
             // TODO: nuke code duplication
             if (count($rdns) > 1) {
                 // Multivalued RDN!
@@ -116,10 +116,10 @@ class Horde_Ldap_Util
                         preg_match('/(.+?)(?<!\\\\)=(.+)/', $subrdn_v, $matches);
                         $rdn_ocl         = $matches[1];
                         $rdn_val         = $matches[2];
-                        $unescaped       = self::unescape_dn_value($rdn_val);
+                        $unescaped       = self::unescapeDNValue($rdn_val);
                         $rdns[$subrdn_k] = $unescaped[0];
                     } else {
-                        $unescaped = self::unescape_dn_value($subrdn_v);
+                        $unescaped = self::unescapeDNValue($subrdn_v);
                         $rdns[$subrdn_k] = $unescaped[0];
                     }
                 }
@@ -139,10 +139,10 @@ class Horde_Ldap_Util
                     preg_match('/(.+?)(?<!\\\\)=(.+)/', $value, $matches);
                     $dn_ocl         = $matches[1];
                     $dn_val         = $matches[2];
-                    $unescaped      = self::unescape_dn_value($dn_val);
+                    $unescaped      = self::unescapeDNValue($dn_val);
                     $dn_array[$key] = $unescaped[0];
                 } else {
-                    $unescaped = self::unescape_dn_value($value);
+                    $unescaped = self::unescapeDNValue($value);
                     $dn_array[$key] = $unescaped[0];
                 }
             }
@@ -169,7 +169,7 @@ class Horde_Ldap_Util
      *
      * @return array  The escaped values.
      */
-    public static function escape_dn_value($values)
+    public static function escapeDNValue($values)
     {
         // Parameter validation.
         if (!is_array($values)) {
@@ -202,7 +202,7 @@ class Horde_Ldap_Util
     /**
      * Unescapes DN values according to RFC 2253.
      *
-     * Reverts the conversion done by escape_dn_value().
+     * Reverts the conversion done by escapeDNValue().
      *
      * Any escape sequence starting with a baskslash - hexpair or special
      * character - will be transformed back to the corresponding character.
@@ -211,7 +211,7 @@ class Horde_Ldap_Util
      *
      * @return array  Unescaped DN values.
      */
-    public static function unescape_dn_value($values)
+    public static function unescapeDNValue($values)
     {
         // Parameter validation.
         if (!is_array($values)) {
@@ -235,7 +235,7 @@ class Horde_Ldap_Util
     /**
      * Converts a DN into a canonical form.
      *
-     * DN can either be a string or an array as returned by ldap_explode_dn(),
+     * DN can either be a string or an array as returned by explodeDN(),
      * which is useful when constructing a DN.  The DN array may have be
      * indexed (each array value is a OCL=VALUE pair) or associative (array key
      * is OCL and value is VALUE).
@@ -270,7 +270,7 @@ class Horde_Ldap_Util
      *
      * @return boolean|string The canonical DN or false if the DN is not valid.
      */
-    public static function canonical_dn($dn, $options = array())
+    public static function canonicalDN($dn, $options = array())
     {
         if ($dn === '') {
             // Empty DN is valid.
@@ -293,7 +293,7 @@ class Horde_Ldap_Util
             $dn = preg_split('/(?<=[^\\\\])' . $options['separator'] . '/', $dn);
 
             // Clear wrong splitting (possibly we have split too much).
-            $dn = self::_correct_dn_splitting($dn, $options['separator']);
+            $dn = self::_correctDNSplitting($dn, $options['separator']);
         } else {
             // Is array, check if the array is indexed or associative.
             $assoc = false;
@@ -333,7 +333,7 @@ class Horde_Ldap_Util
                     if (!is_int($subkey)) {
                         $subval = $subkey . '=' . $subval;
                     }
-                    $subval_processed = self::canonical_dn($subval);
+                    $subval_processed = self::canonicalDN($subval);
                     if (false === $subval_processed) {
                         return false;
                     }
@@ -343,16 +343,16 @@ class Horde_Ldap_Util
                 $dn[$pos] = substr($dnval_new, 0, -1);
             } else {
                 // Try to split multivalued RDNs into array.
-                $rdns = self::split_rdn_multival($dnval);
+                $rdns = self::splitRDNMultivalue($dnval);
                 if (count($rdns) > 1) {
                     // Multivalued RDN was detected. The RDN value is expected
-                    // to be correctly split by split_rdn_multival(). It's time
+                    // to be correctly split by splitRDNMultivalue(). It's time
                     // to sort the RDN and build the DN.
                     $rdn_string = '';
                     // Sort RDN keys alphabetically.
                     sort($rdns, SORT_STRING);
                     foreach ($rdns as $rdn) {
-                        $subval_processed = self::canonical_dn($rdn);
+                        $subval_processed = self::canonicalDN($rdn);
                         if (false === $subval_processed) {
                             return false;
                         }
@@ -379,12 +379,12 @@ class Horde_Ldap_Util
                         if ($options['casefold'] == 'lower') {
                             $ocl = strtolower($ocl);
                         }
-                        $ocl = self::escape_dn_value(array($ocl));
+                        $ocl = self::escapeDNValue(array($ocl));
                         $ocl = $ocl[0];
                     }
 
                     // Escaping of DN value.
-                    $val = self::escape_dn_value(array($val));
+                    $val = self::escapeDNValue(array($val));
                     $val = str_replace('/', '\/', $val[0]);
 
                     $dn[$pos] = $ocl . '=' . $val;
@@ -412,7 +412,7 @@ class Horde_Ldap_Util
      *
      * @return array Escaped values.
      */
-    public static function escape_filter_value($values)
+    public static function escapeFilterValue($values)
     {
         // Parameter validation.
         if (!is_array($values)) {
@@ -442,7 +442,7 @@ class Horde_Ldap_Util
     /**
      * Unescapes the given values according to RFC 2254.
      *
-     * Reverses the conversion done by {@link escape_filter_value()}.
+     * Reverses the conversion done by {@link escapeFilterValue()}.
      *
      * Converts any sequences of a backslash followed by two hex digits into
      * the corresponding character.
@@ -451,7 +451,7 @@ class Horde_Ldap_Util
      *
      * @return array Unescaped values.
      */
-    public static function unescape_filter_value($values = array())
+    public static function unescapeFilterValue($values = array())
     {
         // Parameter validation.
         if (!is_array($values)) {
@@ -535,10 +535,10 @@ class Horde_Ldap_Util
      *
      * @return array The components of the multivalued RDN.
      */
-    public static function split_rdn_multival($rdn)
+    public static function splitRDNMultivalue($rdn)
     {
         $rdns = preg_split('/(?<!\\\\)\+/', $rdn);
-        $rdns = self::_correct_dn_splitting($rdns, '+');
+        $rdns = self::_correctDNSplitting($rdns, '+');
         return array_values($rdns);
     }
 
@@ -551,7 +551,7 @@ class Horde_Ldap_Util
      *
      * @return array Indexed array: 0=attribute name, 1=attribute value.
      */
-    public static function split_attribute_string($attr)
+    public static function splitAttributeString($attr)
     {
         return preg_split('/(?<!\\\\)=/', $attr, 2);
     }
@@ -564,7 +564,7 @@ class Horde_Ldap_Util
      *
      * @return array Corrected array.
      */
-    protected static function _correct_dn_splitting($dn = array(),
+    protected static function _correctDNSplitting($dn = array(),
                                                     $separator = ',')
     {
         foreach ($dn as $key => $dn_value) {
index 86429ea..f124cc6 100644 (file)
@@ -10,7 +10,7 @@
 class Horde_Ldap_UtilTest extends PHPUnit_Framework_TestCase
 {
     /**
-     * Test escape_dn_value()
+     * Test escapeDNValue()
      */
     public function testEscape_dn_value()
     {
@@ -20,23 +20,23 @@ class Horde_Ldap_UtilTest extends PHPUnit_Framework_TestCase
         // String call.
         $this->assertEquals(
             array($expected),
-            Horde_Ldap_Util::escape_dn_value($dnval));
+            Horde_Ldap_Util::escapeDNValue($dnval));
 
         // Array call.
         $this->assertEquals(
             array($expected),
-            Horde_Ldap_Util::escape_dn_value(array($dnval)));
+            Horde_Ldap_Util::escapeDNValue(array($dnval)));
 
         // Multiple arrays.
         $this->assertEquals(
             array($expected, $expected, $expected),
-            Horde_Ldap_Util::escape_dn_value(array($dnval, $dnval, $dnval)));
+            Horde_Ldap_Util::escapeDNValue(array($dnval, $dnval, $dnval)));
     }
 
     /**
-     * Test unescape_dn_value()
+     * Test unescapeDNValue()
      */
-    public function testUnescape_dn_value()
+    public function testUnescapeDNValue()
     {
         $dnval    = '\\20\\20\\16\\20t\\,e\\+s \\"t\\,\\\\v\\<a\\>l\\;u\\#e\\=!\\20\\20\\20\\20';
         $expected = '  ' . chr(22) . ' t,e+s "t,\\v<a>l;u#e=!    ';
@@ -44,17 +44,17 @@ class Horde_Ldap_UtilTest extends PHPUnit_Framework_TestCase
         // String call.
         $this->assertEquals(
             array($expected),
-            Horde_Ldap_Util::unescape_dn_value($dnval));
+            Horde_Ldap_Util::unescapeDNValue($dnval));
 
         // Array call.
         $this->assertEquals(
             array($expected),
-            Horde_Ldap_Util::unescape_dn_value(array($dnval)));
+            Horde_Ldap_Util::unescapeDNValue(array($dnval)));
 
         // Multiple arrays.
         $this->assertEquals(
             array($expected, $expected, $expected),
-            Horde_Ldap_Util::unescape_dn_value(array($dnval, $dnval, $dnval)));
+            Horde_Ldap_Util::unescapeDNValue(array($dnval, $dnval, $dnval)));
     }
 
     /**
@@ -68,23 +68,23 @@ class Horde_Ldap_UtilTest extends PHPUnit_Framework_TestCase
         // String call
         $this->assertEquals(
             array($expected),
-            Horde_Ldap_Util::escape_filter_value($filterval));
+            Horde_Ldap_Util::escapeFilterValue($filterval));
 
         // Array call.
         $this->assertEquals(
             array($expected),
-            Horde_Ldap_Util::escape_filter_value(array($filterval)));
+            Horde_Ldap_Util::escapeFilterValue(array($filterval)));
 
         // Multiple arrays.
         $this->assertEquals(
             array($expected, $expected, $expected),
-            Horde_Ldap_Util::escape_filter_value(array($filterval, $filterval, $filterval)));
+            Horde_Ldap_Util::escapeFilterValue(array($filterval, $filterval, $filterval)));
     }
 
     /**
      * Test unescaping of filter values.
      */
-    public function testUnescape_filter_value()
+    public function testUnescapeFilterValue()
     {
         $expected  = 't(e,s)t*v\\al' . chr(30) . 'ue';
         $filterval = 't\28e,s\29t\2av\5cal\1eue';
@@ -92,17 +92,17 @@ class Horde_Ldap_UtilTest extends PHPUnit_Framework_TestCase
         // String call
         $this->assertEquals(
             array($expected),
-            Horde_Ldap_Util::unescape_filter_value($filterval));
+            Horde_Ldap_Util::unescapeFilterValue($filterval));
 
         // Array call.
         $this->assertEquals(
             array($expected),
-            Horde_Ldap_Util::unescape_filter_value(array($filterval)));
+            Horde_Ldap_Util::unescapeFilterValue(array($filterval)));
 
         // Multiple arrays.
         $this->assertEquals(
             array($expected, $expected, $expected),
-            Horde_Ldap_Util::unescape_filter_value(array($filterval, $filterval, $filterval)));
+            Horde_Ldap_Util::unescapeFilterValue(array($filterval, $filterval, $filterval)));
     }
 
     /**
@@ -132,7 +132,7 @@ class Horde_Ldap_UtilTest extends PHPUnit_Framework_TestCase
     }
 
     /**
-     * Tests split_rdn_multival()
+     * Tests splitRDNMultivalue()
      *
      * In addition to the above test of the basic split correction, we test
      * here the functionality of multivalued RDNs.
@@ -142,37 +142,37 @@ class Horde_Ldap_UtilTest extends PHPUnit_Framework_TestCase
         // One value.
         $rdn = 'CN=J. Smith';
         $expected = array('CN=J. Smith');
-        $split = Horde_Ldap_Util::split_rdn_multival($rdn);
+        $split = Horde_Ldap_Util::splitRDNMultivalue($rdn);
         $this->assertEquals($expected, $split);
 
         // Two values.
         $rdn = 'OU=Sales+CN=J. Smith';
         $expected = array('OU=Sales', 'CN=J. Smith');
-        $split = Horde_Ldap_Util::split_rdn_multival($rdn);
+        $split = Horde_Ldap_Util::splitRDNMultivalue($rdn);
         $this->assertEquals($expected, $split);
 
         // Several multivals.
         $rdn = 'OU=Sales+CN=J. Smith+L=London+C=England';
         $expected = array('OU=Sales', 'CN=J. Smith', 'L=London', 'C=England');
-        $split = Horde_Ldap_Util::split_rdn_multival($rdn);
+        $split = Horde_Ldap_Util::splitRDNMultivalue($rdn);
         $this->assertEquals($expected, $split);
 
         // Unescaped "+" in value.
         $rdn = 'OU=Sa+les+CN=J. Smith';
         $expected = array('OU=Sa+les', 'CN=J. Smith');
-        $split = Horde_Ldap_Util::split_rdn_multival($rdn);
+        $split = Horde_Ldap_Util::splitRDNMultivalue($rdn);
         $this->assertEquals($expected, $split);
 
         // Unescaped "+" in attr name.
         $rdn = 'O+U=Sales+CN=J. Smith';
         $expected = array('O+U=Sales', 'CN=J. Smith');
-        $split = Horde_Ldap_Util::split_rdn_multival($rdn);
+        $split = Horde_Ldap_Util::splitRDNMultivalue($rdn);
         $this->assertEquals($expected, $split);
 
         // Unescaped "+" in attr name + value.
         $rdn = 'O+U=Sales+CN=J. Sm+ith';
         $expected = array('O+U=Sales', 'CN=J. Sm+ith');
-        $split = Horde_Ldap_Util::split_rdn_multival($rdn);
+        $split = Horde_Ldap_Util::splitRDNMultivalue($rdn);
         $this->assertEquals($expected, $split);
 
         // Unescaped "+" in attribute name, but not first attribute.  This
@@ -183,13 +183,13 @@ class Horde_Ldap_UtilTest extends PHPUnit_Framework_TestCase
         $rdn = 'OU=Sales+C+N=J. Smith';
         // The "C+" is treaten as value of "OU".
         $expected = array('OU=Sales+C', 'N=J. Smith');
-        $split = Horde_Ldap_Util::split_rdn_multival($rdn);
+        $split = Horde_Ldap_Util::splitRDNMultivalue($rdn);
         $this->assertEquals($expected, $split);
 
         // Escaped "+" in attribute name and value.
         $rdn = 'O\+U=Sales+CN=J. Sm\+ith';
         $expected = array('O\+U=Sales', 'CN=J. Sm\+ith');
-        $split = Horde_Ldap_Util::split_rdn_multival($rdn);
+        $split = Horde_Ldap_Util::splitRDNMultivalue($rdn);
         $this->assertEquals($expected, $split);
     }
 
@@ -202,19 +202,19 @@ class Horde_Ldap_UtilTest extends PHPUnit_Framework_TestCase
 
         // Properly.
         $expected = array('foo', 'bar');
-        $split = Horde_Ldap_Util::split_attribute_string($attr_str);
+        $split = Horde_Ldap_Util::splitAttributeString($attr_str);
         $this->assertEquals($expected, $split);
 
         // Escaped "=".
         $attr_str = "fo\=o=b\=ar";
         $expected = array('fo\=o', 'b\=ar');
-        $split = Horde_Ldap_Util::split_attribute_string($attr_str);
+        $split = Horde_Ldap_Util::splitAttributeString($attr_str);
         $this->assertEquals($expected, $split);
 
         // Escaped "=" and unescaped = later on.
         $attr_str = "fo\=o=b=ar";
         $expected = array('fo\=o', 'b=ar');
-        $split = Horde_Ldap_Util::split_attribute_string($attr_str);
+        $split = Horde_Ldap_Util::splitAttributeString($attr_str);
         $this->assertEquals($expected, $split);
     }
 
@@ -247,74 +247,74 @@ class Horde_Ldap_UtilTest extends PHPUnit_Framework_TestCase
         $expected_reverse = array_reverse($expected_casefold_upper);
 
 
-        $dn_exploded_cnone = Horde_Ldap_Util::ldap_explode_dn($dn, array('casefold' => 'none'));
+        $dn_exploded_cnone = Horde_Ldap_Util::explodeDN($dn, array('casefold' => 'none'));
         $this->assertEquals($expected_casefold_none, $dn_exploded_cnone, 'Option casefold none failed');
 
-        $dn_exploded_cupper = Horde_Ldap_Util::ldap_explode_dn($dn, array('casefold' => 'upper'));
+        $dn_exploded_cupper = Horde_Ldap_Util::explodeDN($dn, array('casefold' => 'upper'));
         $this->assertEquals($expected_casefold_upper, $dn_exploded_cupper, 'Option casefold upper failed');
 
-        $dn_exploded_clower = Horde_Ldap_Util::ldap_explode_dn($dn, array('casefold' => 'lower'));
+        $dn_exploded_clower = Horde_Ldap_Util::explodeDN($dn, array('casefold' => 'lower'));
         $this->assertEquals($expected_casefold_lower, $dn_exploded_clower, 'Option casefold lower failed');
 
-        $dn_exploded_onlyval = Horde_Ldap_Util::ldap_explode_dn($dn, array('onlyvalues' => true));
+        $dn_exploded_onlyval = Horde_Ldap_Util::explodeDN($dn, array('onlyvalues' => true));
         $this->assertEquals($expected_onlyvalues, $dn_exploded_onlyval, 'Option onlyval failed');
 
-        $dn_exploded_reverse = Horde_Ldap_Util::ldap_explode_dn($dn, array('reverse' => true));
+        $dn_exploded_reverse = Horde_Ldap_Util::explodeDN($dn, array('reverse' => true));
         $this->assertEquals($expected_reverse, $dn_exploded_reverse, 'Option reverse failed');
     }
 
     /**
-     * Tests if canonical_dn() works.
+     * Tests if canonicalDN() works.
      *
-     * Note: This tests depend on the default options of canonical_dn().
+     * Note: This tests depend on the default options of canonicalDN().
      */
     public function testCanonical_dn()
     {
         // Test empty dn (is valid according to RFC).
-        $this->assertEquals('', Horde_Ldap_Util::canonical_dn(''));
+        $this->assertEquals('', Horde_Ldap_Util::canonicalDN(''));
 
         // Default options with common DN.
         $testdn   = 'cn=beni,DC=php,c=net';
         $expected = 'CN=beni,DC=php,C=net';
-        $this->assertEquals($expected, Horde_Ldap_Util::canonical_dn($testdn));
+        $this->assertEquals($expected, Horde_Ldap_Util::canonicalDN($testdn));
 
         // Casefold tests with common DN.
         $expected_up = 'CN=beni,DC=php,C=net';
         $expected_lo = 'cn=beni,dc=php,c=net';
         $expected_no = 'cn=beni,DC=php,c=net';
-        $this->assertEquals($expected_up, Horde_Ldap_Util::canonical_dn($testdn, array('casefold' => 'upper')));
-        $this->assertEquals($expected_lo, Horde_Ldap_Util::canonical_dn($testdn, array('casefold' => 'lower')));
-        $this->assertEquals($expected_no, Horde_Ldap_Util::canonical_dn($testdn, array('casefold' => 'none')));
+        $this->assertEquals($expected_up, Horde_Ldap_Util::canonicalDN($testdn, array('casefold' => 'upper')));
+        $this->assertEquals($expected_lo, Horde_Ldap_Util::canonicalDN($testdn, array('casefold' => 'lower')));
+        $this->assertEquals($expected_no, Horde_Ldap_Util::canonicalDN($testdn, array('casefold' => 'none')));
 
         // Reverse.
         $expected_rev = 'C=net,DC=php,CN=beni';
-        $this->assertEquals($expected_rev, Horde_Ldap_Util::canonical_dn($testdn, array('reverse' => true)), 'Option reverse failed');
+        $this->assertEquals($expected_rev, Horde_Ldap_Util::canonicalDN($testdn, array('reverse' => true)), 'Option reverse failed');
 
         // DN as arrays.
         $dn_index = array('cn=beni', 'dc=php', 'c=net');
         $dn_assoc = array('cn' => 'beni', 'dc' => 'php', 'c' => 'net');
         $expected = 'CN=beni,DC=php,C=net';
-        $this->assertEquals($expected, Horde_Ldap_Util::canonical_dn($dn_index));
-        $this->assertEquals($expected, Horde_Ldap_Util::canonical_dn($dn_assoc));
+        $this->assertEquals($expected, Horde_Ldap_Util::canonicalDN($dn_index));
+        $this->assertEquals($expected, Horde_Ldap_Util::canonicalDN($dn_assoc));
 
         // DN with multiple RDN value.
         $testdn       = 'ou=dev+cn=beni,DC=php,c=net';
         $testdn_index = array(array('ou=dev', 'cn=beni'), 'DC=php', 'c=net');
         $testdn_assoc = array(array('ou' => 'dev', 'cn' => 'beni'), 'DC' => 'php', 'c' => 'net');
         $expected     = 'CN=beni+OU=dev,DC=php,C=net';
-        $this->assertEquals($expected, Horde_Ldap_Util::canonical_dn($testdn));
-        $this->assertEquals($expected, Horde_Ldap_Util::canonical_dn($testdn_assoc));
-        $this->assertEquals($expected, Horde_Ldap_Util::canonical_dn($expected));
+        $this->assertEquals($expected, Horde_Ldap_Util::canonicalDN($testdn));
+        $this->assertEquals($expected, Horde_Ldap_Util::canonicalDN($testdn_assoc));
+        $this->assertEquals($expected, Horde_Ldap_Util::canonicalDN($expected));
 
         // Test DN with OID.
         $testdn = 'OID.2.5.4.3=beni,dc=php,c=net';
         $expected = '2.5.4.3=beni,DC=php,C=net';
-        $this->assertEquals($expected, Horde_Ldap_Util::canonical_dn($testdn));
+        $this->assertEquals($expected, Horde_Ldap_Util::canonicalDN($testdn));
 
         // Test with leading and ending spaces.
         $testdn   = 'cn=  beni  ,DC=php,c=net';
         $expected = 'CN=\20\20beni\20\20,DC=php,C=net';
-        $this->assertEquals($expected, Horde_Ldap_Util::canonical_dn($testdn));
+        $this->assertEquals($expected, Horde_Ldap_Util::canonicalDN($testdn));
 
         // Test with to-be escaped characters in attribute value.
         $specialchars = array(
@@ -336,9 +336,9 @@ class Horde_Ldap_UtilTest extends PHPUnit_Framework_TestCase
             $test_assoc  = array('CN' => 'be' . $char . 'ni', 'DC' => 'ph' . $char . 'p', 'C' => 'net');
             $expected    = 'CN=be' . $escape . 'ni,DC=ph' . $escape . 'p,C=net';
 
-            $this->assertEquals($expected, Horde_Ldap_Util::canonical_dn($test_string), 'String escaping test (' . $char . ') failed');
-            $this->assertEquals($expected, Horde_Ldap_Util::canonical_dn($test_index),  'Indexed array escaping test (' . $char . ') failed');
-            $this->assertEquals($expected, Horde_Ldap_Util::canonical_dn($test_assoc),  'Associative array encoding test (' . $char . ') failed');
+            $this->assertEquals($expected, Horde_Ldap_Util::canonicalDN($test_string), 'String escaping test (' . $char . ') failed');
+            $this->assertEquals($expected, Horde_Ldap_Util::canonicalDN($test_index),  'Indexed array escaping test (' . $char . ') failed');
+            $this->assertEquals($expected, Horde_Ldap_Util::canonicalDN($test_assoc),  'Associative array encoding test (' . $char . ') failed');
         }
     }
 }