Renamed it as this class can be anything that implements Visitable
authorRoland Häder <roland@mxchange.org>
Sun, 3 Mar 2013 22:52:31 +0000 (22:52 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 3 Mar 2013 22:52:31 +0000 (22:52 +0000)
application/hub/interfaces/lists/class_Listable.php
application/hub/main/lists/class_BaseList.php
application/hub/main/pools/class_BasePool.php

index dce752b3a5d0982296f00c3661f1f065e135aae3..a54c06f8ea9b46bd982931eeb1beca51b14c2d66 100644 (file)
@@ -42,13 +42,13 @@ interface Listable extends FrameworkInterface, IteratorAggregate {
        /**
         * Adds the given instance to list group and sub group
         *
-        * @param       $groupName      Group to add instance to
-        * @param       $subGroup       Sub group to add instance to
-        * @param       $instance       An instance of Visitable
+        * @param       $groupName                      Group to add instance to
+        * @param       $subGroup                       Sub group to add instance to
+        * @param       $visitableInstance      An instance of Visitable
         * @return      void
         * @throws      NoListGroupException    If the given group is not found
         */
-       function addInstance ($groupName, $subGroup, Visitable $instance);
+       function addInstance ($groupName, $subGroup, Visitable $visitableInstance);
 
        /**
         * Adds the given entry to list group
index 3add9145878e16edbc819b2b8338ad668e6a45c7..0d7454c68a1fa5fea54636683d895326f95dda52 100644 (file)
@@ -109,13 +109,13 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable {
        /**
         * Adds the given instance to list group and sub group
         *
-        * @param       $groupName      Group to add instance to
-        * @param       $subGroup       Sub group to add instance to
-        * @param       $instance       An instance of Visitable
+        * @param       $groupName                      Group to add instance to
+        * @param       $subGroup                       Sub group to add instance to
+        * @param       $visitableInstance      An instance of Visitable
         * @return      void
         * @throws      NoListGroupException    If the given group is not found
         */
-       public function addInstance ($groupName, $subGroup, Visitable $instance) {
+       public function addInstance ($groupName, $subGroup, Visitable $visitableInstance) {
                //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.': '.$groupName  . '/' . $subGroup . ' - START');
                // Is the group there?
                if (!$this->isGroupSet($groupName)) {
@@ -130,7 +130,7 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable {
                } // END - if
 
                // Generate the hash
-               $hash = $this->generateHash($groupName, $subGroup, $instance);
+               $hash = $this->generateHash($groupName, $subGroup, $visitableInstance);
 
                // Now add it to the group list and hash it
                $this->listGroups[$groupName]->addEntry($subGroup, $hash);
@@ -139,7 +139,7 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable {
                array_push($this->listIndex, $hash);
 
                // Add the instance itself to the list
-               $this->listEntries[$hash] = $instance;
+               $this->listEntries[$hash] = $visitableInstance;
                //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.': '.$groupName  . '/' . $subGroup . ' - FINISHED');
        }
 
index c65f8266b65d1fbcd11e9a69674b0bf782ee74a2..025385875820a290f21e8328bf615da8496ee8e6 100644 (file)
@@ -71,12 +71,12 @@ class BasePool extends BaseHubSystem implements Visitable {
        /**
         * Adds an instance to a pool segment
         *
-        * @param       $group                  Name of the pool group
-        * @param       $poolSegment    Name of the pool segment
-        * @param       $instance               An instance of a class that should bed added to the pool
+        * @param       $group                          Name of the pool group
+        * @param       $poolSegment            Name of the pool segment
+        * @param       $visitableInstance      An instance of a class that should bed added to the pool
         * @return      void
         */
-       protected final function addInstance ($group, $poolName, Visitable $instance) {
+       protected final function addInstance ($group, $poolName, Visitable $visitableInstance) {
                // Is the pool group there?
                if (!$this->getPoolEntriesInstance()->isGroupSet($group)) {
                        // Create the missing pool group
@@ -84,7 +84,7 @@ class BasePool extends BaseHubSystem implements Visitable {
                } // END - if
 
                // Add it to given pool group
-               $this->getPoolEntriesInstance()->addInstance($group, $poolName, $instance);
+               $this->getPoolEntriesInstance()->addInstance($group, $poolName, $visitableInstance);
        }
 
        /**