From 94a4d5c67dbf2e6aee1cd832510e9ed52bfcf36b Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 19 May 2014 20:04:29 +0200 Subject: [PATCH] Renamed classes + updated to lastest 'core' commit. Signed-off-by: Roland Haeder --- application/hub/config.php | 8 ++++---- .../hub/main/source/class_BaseUrlSource.php | 14 +++----------- .../urls/{class_CrawlerUrlSource => class_Crawler} | 6 +++--- ...dRss.php => class_CrawlerFoundRssUrlSource.php} | 6 +++--- ...rt.php => class_CrawlerLocalStartUrlSource.php} | 6 +++--- ...tart.php => class_CrawlerRssStartUrlSource.php} | 6 +++--- ....php => class_CrawlerUploadedListUrlSource.php} | 6 +++--- core | 2 +- 8 files changed, 23 insertions(+), 31 deletions(-) rename application/hub/main/source/urls/{class_CrawlerUrlSource => class_Crawler} (90%) rename application/hub/main/source/urls/{class_CrawlerUrlSourceFoundRss.php => class_CrawlerFoundRssUrlSource.php} (89%) rename application/hub/main/source/urls/{class_CrawlerUrlSourceLocalStart.php => class_CrawlerLocalStartUrlSource.php} (89%) rename application/hub/main/source/urls/{class_CrawlerUrlSourceRssStart.php => class_CrawlerRssStartUrlSource.php} (89%) rename application/hub/main/source/urls/{class_CrawlerUrlSourceUploadedList.php => class_CrawlerUploadedListUrlSource.php} (89%) diff --git a/application/hub/config.php b/application/hub/config.php index 6d70ce50c..b0d0d157f 100644 --- a/application/hub/config.php +++ b/application/hub/config.php @@ -1242,16 +1242,16 @@ $cfg->setConfigEntry('communicator_init_state_class', 'CommunicatorInitState'); $cfg->setConfigEntry('crawler_uploaded_list_scanner', 'CrawlerUploadedListScanner'); // CFG: CRAWLER-URL-SOURCE-LOCAL-START-CLASS -$cfg->setConfigEntry('crawler_url_source_local_start_class', 'CrawlerUrlSourceLocalStart'); +$cfg->setConfigEntry('crawler_url_source_local_start_class', 'CrawlerLocalStartUrlSource'); // CFG: CRAWLER-URL-SOURCE-UPLOADED-LIST-CLASS -$cfg->setConfigEntry('crawler_url_source_uploaded_list_class', 'CrawlerUrlSourceUploadedList'); +$cfg->setConfigEntry('crawler_url_source_uploaded_list_class', 'CrawlerUploadedListUrlSource'); // CFG: CRAWLER-URL-SOURCE-RSS-START-CLASS -$cfg->setConfigEntry('crawler_url_source_rss_start_class', 'CrawlerUrlSourceRssStart'); +$cfg->setConfigEntry('crawler_url_source_rss_start_class', 'CrawlerRssStartUrlSource'); // CFG: CRAWLER-URL-SOURCE-FOUND-RSS-CLASS -$cfg->setConfigEntry('crawler_url_source_found_rss_class', 'CrawlerUrlSourceFoundRss'); +$cfg->setConfigEntry('crawler_url_source_found_rss_class', 'CrawlerFoundRssUrlSource'); // CFG: CRAWLER-NODE-COMMUNICATOR-TASK-CLASS $cfg->setConfigEntry('crawler_node_communicator_task_class', 'CrawlerNodeCommunicatorTask'); diff --git a/application/hub/main/source/class_BaseUrlSource.php b/application/hub/main/source/class_BaseUrlSource.php index be0ac63cc..cf8e9b9bd 100644 --- a/application/hub/main/source/class_BaseUrlSource.php +++ b/application/hub/main/source/class_BaseUrlSource.php @@ -41,18 +41,10 @@ class BaseUrlSource extends BaseSource { * @return void */ protected function initSource ($prefix, $sourceName) { - // Construct file stack name - $stackFileName = sprintf('%s%s/%s.%s', - $this->getConfigInstance()->getConfigEntry('base_path'), - $this->getConfigInstance()->getConfigEntry('base_file_stacks_path'), - $sourceName, - $this->getConfigInstance()->getConfigEntry('file_stacks_extension') - ); + // Use another object factory + $stackInstance = FileStackFactory::createFileStackInstance($prefix . '_url', $sourceName); - // Get file-based stack - $stackInstance = ObjectFactory::createObjectByConfiguredName($prefix . '_url_' . $sourceName . '_stack_class', array($stackFileName)); - - // Set stack here + // Set the stack here $this->setStackerInstance($stackInstance); } } diff --git a/application/hub/main/source/urls/class_CrawlerUrlSource b/application/hub/main/source/urls/class_Crawler similarity index 90% rename from application/hub/main/source/urls/class_CrawlerUrlSource rename to application/hub/main/source/urls/class_Crawler index 1fef9c7c9..b77d4e33e 100644 --- a/application/hub/main/source/urls/class_CrawlerUrlSource +++ b/application/hub/main/source/urls/class_Crawler @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class CrawlerUrlSource??? extends BaseUrlSource implements UrlSource, Registerable { +class Crawler???UrlSource extends BaseUrlSource implements UrlSource, Registerable { /** * Protected constructor * @@ -37,9 +37,9 @@ class CrawlerUrlSource??? extends BaseUrlSource implements UrlSource, Registerab * * @return $sourceInstance An instance of a Source class */ - public final static function createCrawlerUrlSource??? () { + public final static function createCrawler???UrlSource () { // Get new instance - $sourceInstance = new CrawlerUrlSource???(); + $sourceInstance = new Crawler???UrlSource(); // Init source $sourceInstance->initSource('crawler', '!!!'); diff --git a/application/hub/main/source/urls/class_CrawlerUrlSourceFoundRss.php b/application/hub/main/source/urls/class_CrawlerFoundRssUrlSource.php similarity index 89% rename from application/hub/main/source/urls/class_CrawlerUrlSourceFoundRss.php rename to application/hub/main/source/urls/class_CrawlerFoundRssUrlSource.php index 9240c8456..7300b36dc 100644 --- a/application/hub/main/source/urls/class_CrawlerUrlSourceFoundRss.php +++ b/application/hub/main/source/urls/class_CrawlerFoundRssUrlSource.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 CrawlerUrlSourceFoundRss extends BaseUrlSource implements UrlSource, Registerable { +class CrawlerFoundRssUrlSource extends BaseUrlSource implements UrlSource, Registerable { /** * Protected constructor * @@ -37,9 +37,9 @@ class CrawlerUrlSourceFoundRss extends BaseUrlSource implements UrlSource, Regis * * @return $sourceInstance An instance of a Source class */ - public final static function createCrawlerUrlSourceFoundRss () { + public final static function createCrawlerFoundRssUrlSource () { // Get new instance - $sourceInstance = new CrawlerUrlSourceFoundRss(); + $sourceInstance = new CrawlerFoundRssUrlSource(); // Init source $sourceInstance->initSource('crawler', 'found_rss'); diff --git a/application/hub/main/source/urls/class_CrawlerUrlSourceLocalStart.php b/application/hub/main/source/urls/class_CrawlerLocalStartUrlSource.php similarity index 89% rename from application/hub/main/source/urls/class_CrawlerUrlSourceLocalStart.php rename to application/hub/main/source/urls/class_CrawlerLocalStartUrlSource.php index 1ccc9efa9..f84bdc147 100644 --- a/application/hub/main/source/urls/class_CrawlerUrlSourceLocalStart.php +++ b/application/hub/main/source/urls/class_CrawlerLocalStartUrlSource.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 CrawlerUrlSourceLocalStart extends BaseUrlSource implements UrlSource, Registerable { +class CrawlerLocalStartUrlSource extends BaseUrlSource implements UrlSource, Registerable { /** * Protected constructor * @@ -37,9 +37,9 @@ class CrawlerUrlSourceLocalStart extends BaseUrlSource implements UrlSource, Reg * * @return $sourceInstance An instance of a Source class */ - public final static function createCrawlerUrlSourceLocalStart () { + public final static function createCrawlerLocalStartUrlSource () { // Get new instance - $sourceInstance = new CrawlerUrlSourceLocalStart(); + $sourceInstance = new CrawlerLocalStartUrlSource(); // Init source $sourceInstance->initSource('crawler', 'local_start'); diff --git a/application/hub/main/source/urls/class_CrawlerUrlSourceRssStart.php b/application/hub/main/source/urls/class_CrawlerRssStartUrlSource.php similarity index 89% rename from application/hub/main/source/urls/class_CrawlerUrlSourceRssStart.php rename to application/hub/main/source/urls/class_CrawlerRssStartUrlSource.php index 12177e7ad..e53ef143e 100644 --- a/application/hub/main/source/urls/class_CrawlerUrlSourceRssStart.php +++ b/application/hub/main/source/urls/class_CrawlerRssStartUrlSource.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 CrawlerUrlSourceRssStart extends BaseUrlSource implements UrlSource, Registerable { +class CrawlerRssStartUrlSource extends BaseUrlSource implements UrlSource, Registerable { /** * Protected constructor * @@ -37,9 +37,9 @@ class CrawlerUrlSourceRssStart extends BaseUrlSource implements UrlSource, Regis * * @return $sourceInstance An instance of a Source class */ - public final static function createCrawlerUrlSourceRssStart () { + public final static function createCrawlerRssStartUrlSource () { // Get new instance - $sourceInstance = new CrawlerUrlSourceRssStart(); + $sourceInstance = new CrawlerRssStartUrlSource(); // Init source $sourceInstance->initSource('crawler', 'rss_start'); diff --git a/application/hub/main/source/urls/class_CrawlerUrlSourceUploadedList.php b/application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php similarity index 89% rename from application/hub/main/source/urls/class_CrawlerUrlSourceUploadedList.php rename to application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php index 96d1ba2d6..90415e019 100644 --- a/application/hub/main/source/urls/class_CrawlerUrlSourceUploadedList.php +++ b/application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.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 CrawlerUrlSourceUploadedList extends BaseUrlSource implements UrlSource, Registerable { +class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, Registerable { /** * Protected constructor * @@ -37,9 +37,9 @@ class CrawlerUrlSourceUploadedList extends BaseUrlSource implements UrlSource, R * * @return $sourceInstance An instance of a Source class */ - public final static function createCrawlerUrlSourceUploadedList () { + public final static function createCrawlerUploadedListUrlSource () { // Get new instance - $sourceInstance = new CrawlerUrlSourceUploadedList(); + $sourceInstance = new CrawlerUploadedListUrlSource(); // Init source $sourceInstance->initSource('crawler', 'uploaded_list'); diff --git a/core b/core index 3f5eecf55..e947d4d08 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 3f5eecf55062fd4c24d483be590f38359eec5b76 +Subproject commit e947d4d080c0780f1573344736abd2699e2e462a -- 2.39.2