]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/iterator/network/class_NetworkListenIterator.php
Updated 'core'.
[hub.git] / application / hub / main / iterator / network / class_NetworkListenIterator.php
index 62640bd0134fe8fbf18a72739362cbaac0911098..18c2e8018a6a172240d43b9caa49fa542273f9e4 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A NetworkListen iterator
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  * @todo               This current implementation is not recommended, use a
  * @todo               latency-based iteration or similar approaches
  *
@@ -42,10 +42,10 @@ class NetworkListenIterator extends BaseIterator implements Iterator {
        /**
         * Creates an instance of this class
         *
-        * @param       $listInstance           A list of a IteratorAggregate
+        * @param       $listInstance           A list of a Listable
         * @return      $iteratorInstance       An instance a Iterator class
         */
-       public final static function createNetworkListenIterator (IteratorAggregate $listInstance) {
+       public static final function createNetworkListenIterator (Listable $listInstance) {
                // Get new instance
                $iteratorInstance = new NetworkListenIterator();
 
@@ -64,7 +64,7 @@ class NetworkListenIterator extends BaseIterator implements Iterator {
         */
        public function current () {
                // Default is null
-               $current = null;
+               $current = NULL;
 
                // Is the entry valid?
                if (!$this->valid()) {
@@ -107,12 +107,12 @@ class NetworkListenIterator extends BaseIterator implements Iterator {
        }
 
        /**
-        * Checks wether the current entry is valid (not at the end of the list)
+        * Checks whether the current entry is valid (not at the end of the list)
         *
-        * @return      $isValid        Wether the current entry is there
+        * @return      $isValid        Whether the current entry is there
         */
        public function valid () {
-               // Check for total active clients and if we are not at the end
+               // Check for total active peers and if we are not at the end
                $isValid = ($this->key() < $this->getListInstance()->count());
 
                // Return result