]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceFoundRssTask.php
Merge branch 'refacuring/protocol_handler' into latest-core/crawler
[hub.git] / application / hub / main / tasks / crawler / url_source / class_CrawlerUrlSourceFoundRssTask.php
index 14236c6ffa6ed537675ecefb1549d905ce3f02eb..823ba33366cb5b217c842896aee0f33b87cc9cc4 100644 (file)
@@ -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 CrawlerUrlSourceFoundRssTask extends BaseTask implements Taskable, Visitable {
+class CrawlerUrlSourceFoundRssTask extends BaseUrlSourceTask implements Taskable, Visitable {
        /**
         * Protected constructor
         *
@@ -63,8 +63,20 @@ class CrawlerUrlSourceFoundRssTask extends BaseTask implements Taskable, Visitab
         * @return      void
         */
        public function executeTask () {
-               // Get the URL source instance and announce us
-               UrlSourceObjectFactory::createUrlSourceInstance($this)->processStack();
+               // Get source instance
+               $sourceInstance = $this->getUrlSourceInstance();
+
+               // Is it not set?
+               if (is_null($sourceInstance)) {
+                       // Initialize it
+                       $this->initUrlSourceTask();
+
+                       // And re-get it
+                       $sourceInstance = $this->getUrlSourceInstance();
+               } // END - if
+
+               // Get the URL source instance and fill the stack with crawl entries
+               $sourceInstance->fillUrlStack();
        }
 }