]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/crawler/class_BaseNodeCrawler.php
Added initial crawler stuff:
[hub.git] / application / hub / main / crawler / class_BaseNodeCrawler.php
index c515456c626ea300a4836d920288eb7fc3cce5be..62ab12074a83b53c1ac107e21c50f88307974d66 100644 (file)
@@ -36,6 +36,31 @@ class BaseNodeCrawler extends BaseHubSystem {
        protected function __construct ($className) {
                // Call parent constructor
                parent::__construct($className);
+
+               // Init state which sets the state to 'init'
+               $this->initState();
+       }
+
+       /**
+        * Initializes the node's state which sets it to 'init'
+        *
+        * @return      void
+        */
+       private function initState() {
+               // Get the state factory and create the initial state.
+               CrawlerStateFactory::createCrawlerStateInstanceByName('init', $this);
+       }
+
+       /**
+        * Initializes this crawler instance
+        *
+        * @param       $stateInstance  An instance of a Stateable class
+        * @return      void
+        * @todo        0% done
+        */
+       public function initCrawler (Stateable $stateInstance) {
+               // Please implement
+               $this->partialStub('Unfinished method.');
        }
 
        /**