]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/tasks/hub/ping/class_HubPingTask.php
Development (again) continued:
[hub.git] / application / hub / main / tasks / hub / ping / class_HubPingTask.php
index ba3d37dd2e284a65a381e481be6cb36b79d807a7..272617a20877800419a56a7385743a5381103647 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -21,7 +21,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
-class HubPingTask extends BaseTask implements Visitable, Taskable {
+class HubPingTask extends BaseTask implements Taskable, Visitable {
        /**
         * Protected constructor
         *
@@ -36,9 +36,9 @@ class HubPingTask extends BaseTask implements Visitable, Taskable {
         * Creates an instance of this class
         *
         * @param       $listInstance   A Listable instance
-        * @return      $taskInstance   An instance of a Visitable class
+        * @return      $taskInstance   An instance of a Taskable/Visitable class
         */
-       public final static function createHubPingTask (Listable $listInstance) {
+       public static final function createHubPingTask (Listable $listInstance) {
                // Get new instance
                $taskInstance = new HubPingTask();
 
@@ -46,7 +46,7 @@ class HubPingTask extends BaseTask implements Visitable, Taskable {
                $taskInstance->setListInstance($listInstance);
 
                // Init ping iterator instance
-               $iteratorInstance = ObjectFactory::createObjectByConfiguredName('hub_ping_iterator_class', array($listInstance));
+               $iteratorInstance = $listInstance->getListIterator();
 
                // Set it as well
                $taskInstance->setIteratorInstance($iteratorInstance);
@@ -56,11 +56,11 @@ class HubPingTask extends BaseTask implements Visitable, Taskable {
        }
 
        /**
-        * Accepts the visitor to rpocess the visit "request"
+        * Accepts the visitor to process the visit "request"
         *
         * @param       $visitorInstance        An instance of a Visitor class
         * @return      void
-        * @todo        0%
+        * @todo        Also visit some sub-objects?
         */
        public function accept (Visitor $visitorInstance) {
                // Visit this task
@@ -71,8 +71,9 @@ class HubPingTask extends BaseTask implements Visitable, Taskable {
         * Executes the task
         *
         * @return      void
+        * @todo        0% done
         */
-       public function execute () {
+       public function executeTask () {
                $this->partialStub('Unimplemented task.');
        }
 }