Added accept() and doShutdown() to Taskable as this will always be needed.
authorRoland Haeder <roland@mxchange.org>
Wed, 10 Jun 2015 18:10:41 +0000 (20:10 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 10 Jun 2015 18:10:41 +0000 (20:10 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/classes/interfaces/tasks/class_Taskable.php
inc/classes/main/tasks/class_
inc/classes/main/tasks/idle/class_IdleLoopTask.php

index 9ec1a71179299466943aacfb6e91282a0b705eb7..b1915b9270291f801a53478ba6ab4f1202db79b1 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 interface Taskable extends FrameworkInterface {
+       /**
+        * Accepts the visitor to process the visitor
+        *
+        * @param       $visitorInstance        An instance of a Visitor class
+        * @return      void
+        */
+       function accept (Visitor $visitorInstance);
+
        /**
         * Executes the task
         *
         * @return      void
         */
        function executeTask ();
+
+       /**
+        * Shuts down the task
+        *
+        * @return      void
+        */
+       function doShutdown ();
 }
 
 // [EOF]
index daacdebdb2150f481911965fda93516526b4e160..1bbb87e2abd71685faf28a0e05faaf68c0d24b4a 100644 (file)
@@ -66,6 +66,16 @@ class !!!???Task extends BaseTask implements Taskable, Visitable {
        public function executeTask () {
                $this->partialStub('Unimplemented task.');
        }
+
+       /**
+        * Shuts down the task
+        *
+        * @return      void
+        * @todo        0% done
+        */
+       public function doShutdown () {
+               self::createDebugInstance(__CLASS__)->debugOutput('TASK[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down...');
+       }
 }
 
 // [EOF]
index f07b0e89967b208f76eb08ec91dc43c58efdbbac..0dd2de9f3d169987f4747f6219f39a9048667826 100644 (file)
@@ -73,7 +73,7 @@ class IdleLoopTask extends BaseTask implements Taskable, Visitable {
         */
        public function doShutdown () {
                // Debug message
-               self::createDebugInstance(__CLASS__)->debugOutput('IDLE-TASK[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down...');
+               self::createDebugInstance(__CLASS__)->debugOutput('TASK[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down...');
        }
 }