From: Roland Haeder Date: Sun, 11 May 2014 12:57:39 +0000 (+0200) Subject: Added classes for crawler sources + rewrote 'Source' interface + added more interface... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f6ddd20124690924b8f0532507988d430d6d6b6f;p=hub.git Added classes for crawler sources + rewrote 'Source' interface + added more interfaces and many more. Signed-off-by: Roland Haeder --- diff --git a/application/hub/interfaces/handler/task/class_HandleableTask.php b/application/hub/interfaces/handler/task/class_HandleableTask.php index ae9c194c6..2020c566f 100644 --- a/application/hub/interfaces/handler/task/class_HandleableTask.php +++ b/application/hub/interfaces/handler/task/class_HandleableTask.php @@ -23,8 +23,15 @@ */ interface HandleableTask extends Handleable { /** - * Registers a task with a task handler. This method throws a - * TaskAlreadyRegisteredException if the task has already been registered + * Searches a task by given instance + * + * @param $taskInstanc An instanceof a Taskable class + * @return $taskName Name of the task as used while registration + */ + function searchTask (Taskable $taskInstance); + + /** + * Registers a task with a task handler. * * @param $taskName A task name to register the task on * @param $taskInstance The instance we should register as a task @@ -33,7 +40,7 @@ interface HandleableTask extends Handleable { function registerTask ($taskName, Visitable $taskInstance); /** - * Checks whether tasks are left including idle task. + * Checks whether tasks are left including idle task * * @return $tasksLeft Whether there are tasks left to handle */ @@ -48,6 +55,14 @@ interface HandleableTask extends Handleable { * @return void */ function handleTasks (); + + /** + * Shuts down all tasks and the task handler itself. This method should be + * called from a corresponding filter class. + * + * @return void + */ + function doShutdown (); } // [EOF] diff --git a/application/hub/interfaces/source/class_Source.php b/application/hub/interfaces/source/class_Source.php new file mode 100644 index 000000000..d66de7af6 --- /dev/null +++ b/application/hub/interfaces/source/class_Source.php @@ -0,0 +1,28 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.shipsimu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +interface Source extends FrameworkInterface { +} + +// [EOF] +?> diff --git a/application/hub/interfaces/source/class_Sourceable.php b/application/hub/interfaces/source/class_Sourceable.php deleted file mode 100644 index 94a23b9fe..000000000 --- a/application/hub/interfaces/source/class_Sourceable.php +++ /dev/null @@ -1,34 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.org - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -interface Sourceable extends FrameworkInterface { - /** - * "Getter" or generator for a message - * - * @return $message A message from our source - */ - function generateMessageFromSource (); -} - -// [EOF] -?> diff --git a/application/hub/interfaces/source/units/.htaccess b/application/hub/interfaces/source/units/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/interfaces/source/units/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/interfaces/source/units/class_UnitSource.php b/application/hub/interfaces/source/units/class_UnitSource.php new file mode 100644 index 000000000..2c25a214b --- /dev/null +++ b/application/hub/interfaces/source/units/class_UnitSource.php @@ -0,0 +1,34 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.shipsimu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +interface UnitSource extends Source { + /** + * "Getter" or generator for a message + * + * @return $message A message from our source + */ + function generateMessageFromSource (); +} + +// [EOF] +?> diff --git a/application/hub/interfaces/source/urls/.htaccess b/application/hub/interfaces/source/urls/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/interfaces/source/urls/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/interfaces/source/urls/class_UrlSource.php b/application/hub/interfaces/source/urls/class_UrlSource.php new file mode 100644 index 000000000..03d51cac7 --- /dev/null +++ b/application/hub/interfaces/source/urls/class_UrlSource.php @@ -0,0 +1,28 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.shipsimu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +interface UrlSource extends Source { +} + +// [EOF] +?> diff --git a/application/hub/main/factories/source/units/class_UnitSourceFactory.php b/application/hub/main/factories/source/units/class_UnitSourceFactory.php index f95687776..06ae52ce3 100644 --- a/application/hub/main/factories/source/units/class_UnitSourceFactory.php +++ b/application/hub/main/factories/source/units/class_UnitSourceFactory.php @@ -36,7 +36,7 @@ class UnitSourceFactory extends ObjectFactory { * Creates an instance of a configurable and singleton unit source * * @param $unitType Type of the unit source - * @return $sourceInstance A Sourceable class instance + * @return $sourceInstance A UnitSource class instance */ public static final function createUnitSourceInstance ($unitType) { // Do we have cache? diff --git a/application/hub/main/factories/source/url/.htaccess b/application/hub/main/factories/source/url/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/main/factories/source/url/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/main/factories/source/url/class_UrlSourceObjectFactory.php b/application/hub/main/factories/source/url/class_UrlSourceObjectFactory.php new file mode 100644 index 000000000..76ac83135 --- /dev/null +++ b/application/hub/main/factories/source/url/class_UrlSourceObjectFactory.php @@ -0,0 +1,75 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class UrlSourceObjectFactory extends ObjectFactory { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Returns a singleton (registry-based) UrlSource instance + * + * @param $taskInstance An instance of a class with an Taskable interface + * @return $sourceInstance An instance of a UrlSource class + */ + public static final function createUrlSourceInstance (Taskable $taskInstance) { + // Get new factory instance + $factoryInstance = new UrlSourceObjectFactory(); + + // Get task handler instance + $handlerInstance = Registry::getRegistry()->getInstance('task_handler'); + + // The default node-mode is from our configuration + $sourceType = $handlerInstance->searchTask($taskInstance); + + // Only let registered tasks pass + assert(!empty($sourceType)); + + // If there is no handler? + if (Registry::getRegistry()->instanceExists('node_' . $sourceType)) { + // Get handler from registry + $sourceInstance = Registry::getRegistry()->getInstance('node_' . $sourceType); + } else { + // Now convert the source type into a class name + $className = $factoryInstance->convertToClassName($sourceType); + + // Get the node instance + $sourceInstance = ObjectFactory::createObjectByName($className); + + // Add it to the registry + Registry::getRegistry()->addInstance('node_' . $sourceType, $sourceInstance); + } + + // Return the instance + return $sourceInstance; + } +} + +// [EOF] +?> diff --git a/application/hub/main/handler/tasks/class_TaskHandler.php b/application/hub/main/handler/tasks/class_TaskHandler.php index b8d1f30c0..f849e4d86 100644 --- a/application/hub/main/handler/tasks/class_TaskHandler.php +++ b/application/hub/main/handler/tasks/class_TaskHandler.php @@ -174,6 +174,35 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask { self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Removing task ' . $taskData['id'] . ' from queue - FINISHED'); } + /** + * Searches a task by given instance + * + * @param $taskInstanc An instanceof a Taskable class + * @return $taskName Name of the task as used while registration + */ + public function searchTask (Taskable $taskInstance) { + // Default is an empty (not found) task name + $taskName = ''; + + // Get whole list + $taskList = $this->getListInstance()->getArrayFromList('tasks'); + + // Search all instances + foreach ($taskList as $currentTask) { + // Does it match given task instance? + if ($currentTask['task_instance']->equals($taskInstance)) { + // Found it + $taskName = $currentTask['id']; + + // Abort here + break; + } // END - if + } // END - foreach + + // Return found name + return $taskName; + } + /** * Registers a task with a task handler. * diff --git a/application/hub/main/source/class_ b/application/hub/main/source/class_ index 46d6533de..2441753bd 100644 --- a/application/hub/main/source/class_ +++ b/application/hub/main/source/class_ @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ???Source extends BaseSource implements Sourceable { +class ???Source extends BaseSource implements Source!!! { /** * Protected constructor * @@ -35,7 +35,7 @@ class ???Source extends BaseSource implements Sourceable { /** * Creates an instance of this class * - * @return $sourceInstance An instance of a Sourceable class + * @return $sourceInstance An instance of a Source class */ public final static function create???Source () { // Get new instance @@ -44,16 +44,6 @@ class ???Source extends BaseSource implements Sourceable { // Return the prepared instance return $sourceInstance; } - - /** - * "Getter" or generator for a message - * - * @return $message A message from our source - * @todo 0% done - */ - public function generateMessageFromSource () { - $this->partialStub('Please implement this method.'); - } } // [EOF] diff --git a/application/hub/main/source/units/class_TestUnitSource.php b/application/hub/main/source/units/class_TestUnitSource.php index a854fd224..118beed4e 100644 --- a/application/hub/main/source/units/class_TestUnitSource.php +++ b/application/hub/main/source/units/class_TestUnitSource.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class TestUnitSource extends BaseSource implements Sourceable, Registerable { +class TestUnitSource extends BaseSource implements UnitSource, Registerable { /** * Protected constructor * @@ -35,7 +35,7 @@ class TestUnitSource extends BaseSource implements Sourceable, Registerable { /** * Creates an instance of this class * - * @return $sourceInstance An instance of a Sourceable class + * @return $sourceInstance An instance of a Source class */ public final static function createTestUnitSource () { // Get new instance diff --git a/application/hub/main/source/urls/.htaccess b/application/hub/main/source/urls/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/main/source/urls/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/main/source/urls/class_CrawlerUrlSource b/application/hub/main/source/urls/class_CrawlerUrlSource new file mode 100644 index 000000000..eb9411024 --- /dev/null +++ b/application/hub/main/source/urls/class_CrawlerUrlSource @@ -0,0 +1,50 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2014 Crawler Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class CrawlerUrlSource??? extends BaseSource implements UrlSource, Registerable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @return $sourceInstance An instance of a Source class + */ + public final static function createCrawlerUrlSource??? () { + // Get new instance + $sourceInstance = new CrawlerUrlSource???(); + + // Return the prepared instance + return $sourceInstance; + } +} + +// [EOF] +?> diff --git a/application/hub/main/source/urls/class_CrawlerUrlSourceFoundRss.php b/application/hub/main/source/urls/class_CrawlerUrlSourceFoundRss.php new file mode 100644 index 000000000..6abf586a6 --- /dev/null +++ b/application/hub/main/source/urls/class_CrawlerUrlSourceFoundRss.php @@ -0,0 +1,50 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2014 Crawler Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class CrawlerUrlSourceFoundRss extends BaseSource implements UrlSource, Registerable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @return $sourceInstance An instance of a Source class + */ + public final static function createCrawlerUrlSourceFoundRss () { + // Get new instance + $sourceInstance = new CrawlerUrlSourceFoundRss(); + + // Return the prepared instance + return $sourceInstance; + } +} + +// [EOF] +?> diff --git a/application/hub/main/source/urls/class_CrawlerUrlSourceLocalStart.php b/application/hub/main/source/urls/class_CrawlerUrlSourceLocalStart.php new file mode 100644 index 000000000..f2b5e1557 --- /dev/null +++ b/application/hub/main/source/urls/class_CrawlerUrlSourceLocalStart.php @@ -0,0 +1,50 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2014 Crawler Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class CrawlerUrlSourceLocalStart extends BaseSource implements UrlSource, Registerable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @return $sourceInstance An instance of a Source class + */ + public final static function createCrawlerUrlSourceLocalStart () { + // Get new instance + $sourceInstance = new CrawlerUrlSourceLocalStart(); + + // Return the prepared instance + return $sourceInstance; + } +} + +// [EOF] +?> diff --git a/application/hub/main/source/urls/class_CrawlerUrlSourceRssStart.php b/application/hub/main/source/urls/class_CrawlerUrlSourceRssStart.php new file mode 100644 index 000000000..c0f880ee7 --- /dev/null +++ b/application/hub/main/source/urls/class_CrawlerUrlSourceRssStart.php @@ -0,0 +1,50 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2014 Crawler Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class CrawlerUrlSourceRssStart extends BaseSource implements UrlSource, Registerable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @return $sourceInstance An instance of a Source class + */ + public final static function createCrawlerUrlSourceRssStart () { + // Get new instance + $sourceInstance = new CrawlerUrlSourceRssStart(); + + // Return the prepared instance + return $sourceInstance; + } +} + +// [EOF] +?> diff --git a/application/hub/main/source/urls/class_CrawlerUrlSourceUploadedList.php b/application/hub/main/source/urls/class_CrawlerUrlSourceUploadedList.php new file mode 100644 index 000000000..ecbbe5938 --- /dev/null +++ b/application/hub/main/source/urls/class_CrawlerUrlSourceUploadedList.php @@ -0,0 +1,50 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2014 Crawler Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class CrawlerUrlSourceUploadedList extends BaseSource implements UrlSource, Registerable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @return $sourceInstance An instance of a Source class + */ + public final static function createCrawlerUrlSourceUploadedList () { + // Get new instance + $sourceInstance = new CrawlerUrlSourceUploadedList(); + + // Return the prepared instance + return $sourceInstance; + } +} + +// [EOF] +?> diff --git a/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSource b/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSource index fc9fa9f0e..b62a9df06 100644 --- a/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSource +++ b/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSource @@ -61,10 +61,10 @@ class CrawlerUrlSource???Task extends BaseTask implements Taskable, Visitable { * Executes the task * * @return void - * @todo 0% */ public function executeTask () { - $this->partialStub('Unimplemented task.'); + // Get the URL source instance and announce us + UrlSourceObjectFactory::createUrlSourceInstance($this)->processStack(); } } diff --git a/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceFoundRssTask.php b/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceFoundRssTask.php index 1988739de..14236c6ff 100644 --- a/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceFoundRssTask.php +++ b/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceFoundRssTask.php @@ -61,10 +61,10 @@ class CrawlerUrlSourceFoundRssTask extends BaseTask implements Taskable, Visitab * Executes the task * * @return void - * @todo 0% */ public function executeTask () { - $this->partialStub('Unimplemented task.'); + // Get the URL source instance and announce us + UrlSourceObjectFactory::createUrlSourceInstance($this)->processStack(); } } diff --git a/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceLocalStartTask.php b/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceLocalStartTask.php index 0972f062a..9fdb71d1d 100644 --- a/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceLocalStartTask.php +++ b/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceLocalStartTask.php @@ -61,10 +61,10 @@ class CrawlerUrlSourceLocalStartTask extends BaseTask implements Taskable, Visit * Executes the task * * @return void - * @todo 0% */ public function executeTask () { - $this->partialStub('Unimplemented task.'); + // Get the URL source instance and announce us + UrlSourceObjectFactory::createUrlSourceInstance($this)->processStack(); } } diff --git a/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceRssStartTask.php b/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceRssStartTask.php index fd1a77d45..413c7ad5d 100644 --- a/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceRssStartTask.php +++ b/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceRssStartTask.php @@ -61,10 +61,10 @@ class CrawlerUrlSourceRssStartTask extends BaseTask implements Taskable, Visitab * Executes the task * * @return void - * @todo 0% */ public function executeTask () { - $this->partialStub('Unimplemented task.'); + // Get the URL source instance and announce us + UrlSourceObjectFactory::createUrlSourceInstance($this)->processStack(); } } diff --git a/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceUploadedListTask.php b/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceUploadedListTask.php index c8b4b7085..7330dda2d 100644 --- a/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceUploadedListTask.php +++ b/application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceUploadedListTask.php @@ -61,10 +61,10 @@ class CrawlerUrlSourceUploadedListTask extends BaseTask implements Taskable, Vis * Executes the task * * @return void - * @todo 0% */ public function executeTask () { - $this->partialStub('Unimplemented task.'); + // Get the URL source instance and announce us + UrlSourceObjectFactory::createUrlSourceInstance($this)->processStack(); } } diff --git a/data/.htaccess b/data/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/data/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/data/stacks/.htaccess b/data/stacks/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/data/stacks/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/data/url_lists/.htaccess b/data/url_lists/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/data/url_lists/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/data/url_lists/demo.lst b/data/url_lists/demo.lst new file mode 100644 index 000000000..84b5b400b --- /dev/null +++ b/data/url_lists/demo.lst @@ -0,0 +1 @@ +http://mxchange.org diff --git a/url_lists/.htaccess b/url_lists/.htaccess deleted file mode 100644 index 3a4288278..000000000 --- a/url_lists/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/url_lists/demo.lst b/url_lists/demo.lst deleted file mode 100644 index 84b5b400b..000000000 --- a/url_lists/demo.lst +++ /dev/null @@ -1 +0,0 @@ -http://mxchange.org