Make these methods public.
authorJan Schneider <jan@horde.org>
Mon, 13 Sep 2010 12:39:49 +0000 (14:39 +0200)
committerJan Schneider <jan@horde.org>
Mon, 13 Sep 2010 13:35:10 +0000 (15:35 +0200)
framework/Group/lib/Horde/Group/Ldap.php
framework/Group/lib/Horde/Group/LdapObject.php

index bfc9d3a..5d41e40 100644 (file)
@@ -186,7 +186,7 @@ class Horde_Group_Ldap extends Horde_Group
         }
 
         $group = new Horde_Group_LdapObject($name, $parent);
-        $group->_fromAttributes($entry);
+        $group->fromAttributes($entry);
         $group->setGroupOb($this);
 
         return $group;
@@ -248,7 +248,7 @@ class Horde_Group_Ldap extends Horde_Group
             $attributes['dn'] = $result[0]['dn'];
 
             $group = new Horde_Group_LdapObject($this->getGroupName($dn));
-            $group->_fromAttributes($attributes);
+            $group->fromAttributes($attributes);
             $group->setGroupOb($this);
             $cache[$dn] = $group;
         }
@@ -285,7 +285,7 @@ class Horde_Group_Ldap extends Horde_Group
 
         $dn = $group->get('dn');
 
-        $entry = $group->_toAttributes();
+        $entry = $group->toAttributes();
         $success = @ldap_add($this->_ds, $dn, $entry);
 
         if (!$success) {
@@ -306,7 +306,7 @@ class Horde_Group_Ldap extends Horde_Group
      */
     public function updateGroup(Horde_Group_DataTreeObject $group)
     {
-        $entry = $group->_toAttributes();
+        $entry = $group->toAttributes();
 
         /* Connect to the LDAP server. */
         $this->_connect();
index 0ccd667..e0561a1 100644 (file)
@@ -60,7 +60,7 @@ class Horde_Group_LdapObject extends Horde_Group_DataTreeObject
      *
      * @param array $attributes  The list of attributes from the backend.
      */
-    protected function _fromAttributes($attributes = array())
+    public function fromAttributes($attributes = array())
     {
         $this->data['users'] = array();
         foreach ($attributes as $key => $value) {
@@ -102,7 +102,7 @@ class Horde_Group_LdapObject extends Horde_Group_DataTreeObject
      *
      * @return array  The entry array.
      */
-    protected function _toAttributes()
+    public function toAttributes()
     {
         $attributes = array();
         foreach ($this->data as $key => $value) {