From: Roland Haeder Date: Mon, 19 May 2014 18:04:29 +0000 (+0200) Subject: Renamed classes + updated to lastest 'core' commit. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=94a4d5c67dbf2e6aee1cd832510e9ed52bfcf36b;p=hub.git Renamed classes + updated to lastest 'core' commit. Signed-off-by: Roland Haeder --- 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_Crawler b/application/hub/main/source/urls/class_Crawler new file mode 100644 index 000000000..b77d4e33e --- /dev/null +++ b/application/hub/main/source/urls/class_Crawler @@ -0,0 +1,63 @@ + + * @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 Crawler???UrlSource extends BaseUrlSource 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 createCrawler???UrlSource () { + // Get new instance + $sourceInstance = new Crawler???UrlSource(); + + // Init source + $sourceInstance->initSource('crawler', '!!!'); + + // Return the prepared instance + return $sourceInstance; + } + + /** + * Processes entries in the stack. + * + * @return void + * @todo 0% done + */ + public function processStack () { + $this->partialStub('Please implement this method.'); + } +} + +// [EOF] +?> diff --git a/application/hub/main/source/urls/class_CrawlerFoundRssUrlSource.php b/application/hub/main/source/urls/class_CrawlerFoundRssUrlSource.php new file mode 100644 index 000000000..7300b36dc --- /dev/null +++ b/application/hub/main/source/urls/class_CrawlerFoundRssUrlSource.php @@ -0,0 +1,63 @@ + + * @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 CrawlerFoundRssUrlSource extends BaseUrlSource 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 createCrawlerFoundRssUrlSource () { + // Get new instance + $sourceInstance = new CrawlerFoundRssUrlSource(); + + // Init source + $sourceInstance->initSource('crawler', 'found_rss'); + + // Return the prepared instance + return $sourceInstance; + } + + /** + * Processes entries in the stack. + * + * @return void + * @todo 0% done + */ + public function processStack () { + $this->partialStub('Please implement this method.'); + } +} + +// [EOF] +?> diff --git a/application/hub/main/source/urls/class_CrawlerLocalStartUrlSource.php b/application/hub/main/source/urls/class_CrawlerLocalStartUrlSource.php new file mode 100644 index 000000000..f84bdc147 --- /dev/null +++ b/application/hub/main/source/urls/class_CrawlerLocalStartUrlSource.php @@ -0,0 +1,63 @@ + + * @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 CrawlerLocalStartUrlSource extends BaseUrlSource 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 createCrawlerLocalStartUrlSource () { + // Get new instance + $sourceInstance = new CrawlerLocalStartUrlSource(); + + // Init source + $sourceInstance->initSource('crawler', 'local_start'); + + // Return the prepared instance + return $sourceInstance; + } + + /** + * Processes entries in the stack. + * + * @return void + * @todo 0% done + */ + public function processStack () { + $this->partialStub('Please implement this method.'); + } +} + +// [EOF] +?> diff --git a/application/hub/main/source/urls/class_CrawlerRssStartUrlSource.php b/application/hub/main/source/urls/class_CrawlerRssStartUrlSource.php new file mode 100644 index 000000000..e53ef143e --- /dev/null +++ b/application/hub/main/source/urls/class_CrawlerRssStartUrlSource.php @@ -0,0 +1,63 @@ + + * @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 CrawlerRssStartUrlSource extends BaseUrlSource 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 createCrawlerRssStartUrlSource () { + // Get new instance + $sourceInstance = new CrawlerRssStartUrlSource(); + + // Init source + $sourceInstance->initSource('crawler', 'rss_start'); + + // Return the prepared instance + return $sourceInstance; + } + + /** + * Processes entries in the stack. + * + * @return void + * @todo 0% done + */ + public function processStack () { + $this->partialStub('Please implement this method.'); + } +} + +// [EOF] +?> diff --git a/application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php b/application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php new file mode 100644 index 000000000..90415e019 --- /dev/null +++ b/application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php @@ -0,0 +1,63 @@ + + * @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 CrawlerUploadedListUrlSource extends BaseUrlSource 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 createCrawlerUploadedListUrlSource () { + // Get new instance + $sourceInstance = new CrawlerUploadedListUrlSource(); + + // Init source + $sourceInstance->initSource('crawler', 'uploaded_list'); + + // Return the prepared instance + return $sourceInstance; + } + + /** + * Processes entries in the stack. + * + * @return void + * @todo 0% done + */ + public function processStack () { + $this->partialStub('Please implement this method.'); + } +} + +// [EOF] +?> diff --git a/application/hub/main/source/urls/class_CrawlerUrlSource b/application/hub/main/source/urls/class_CrawlerUrlSource deleted file mode 100644 index 1fef9c7c9..000000000 --- a/application/hub/main/source/urls/class_CrawlerUrlSource +++ /dev/null @@ -1,63 +0,0 @@ - - * @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 BaseUrlSource 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???(); - - // Init source - $sourceInstance->initSource('crawler', '!!!'); - - // Return the prepared instance - return $sourceInstance; - } - - /** - * Processes entries in the stack. - * - * @return void - * @todo 0% done - */ - public function processStack () { - $this->partialStub('Please implement this method.'); - } -} - -// [EOF] -?> diff --git a/application/hub/main/source/urls/class_CrawlerUrlSourceFoundRss.php b/application/hub/main/source/urls/class_CrawlerUrlSourceFoundRss.php deleted file mode 100644 index 9240c8456..000000000 --- a/application/hub/main/source/urls/class_CrawlerUrlSourceFoundRss.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @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 BaseUrlSource 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(); - - // Init source - $sourceInstance->initSource('crawler', 'found_rss'); - - // Return the prepared instance - return $sourceInstance; - } - - /** - * Processes entries in the stack. - * - * @return void - * @todo 0% done - */ - public function processStack () { - $this->partialStub('Please implement this method.'); - } -} - -// [EOF] -?> diff --git a/application/hub/main/source/urls/class_CrawlerUrlSourceLocalStart.php b/application/hub/main/source/urls/class_CrawlerUrlSourceLocalStart.php deleted file mode 100644 index 1ccc9efa9..000000000 --- a/application/hub/main/source/urls/class_CrawlerUrlSourceLocalStart.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @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 BaseUrlSource 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(); - - // Init source - $sourceInstance->initSource('crawler', 'local_start'); - - // Return the prepared instance - return $sourceInstance; - } - - /** - * Processes entries in the stack. - * - * @return void - * @todo 0% done - */ - public function processStack () { - $this->partialStub('Please implement this method.'); - } -} - -// [EOF] -?> diff --git a/application/hub/main/source/urls/class_CrawlerUrlSourceRssStart.php b/application/hub/main/source/urls/class_CrawlerUrlSourceRssStart.php deleted file mode 100644 index 12177e7ad..000000000 --- a/application/hub/main/source/urls/class_CrawlerUrlSourceRssStart.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @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 BaseUrlSource 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(); - - // Init source - $sourceInstance->initSource('crawler', 'rss_start'); - - // Return the prepared instance - return $sourceInstance; - } - - /** - * Processes entries in the stack. - * - * @return void - * @todo 0% done - */ - public function processStack () { - $this->partialStub('Please implement this method.'); - } -} - -// [EOF] -?> diff --git a/application/hub/main/source/urls/class_CrawlerUrlSourceUploadedList.php b/application/hub/main/source/urls/class_CrawlerUrlSourceUploadedList.php deleted file mode 100644 index 96d1ba2d6..000000000 --- a/application/hub/main/source/urls/class_CrawlerUrlSourceUploadedList.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @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 BaseUrlSource 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(); - - // Init source - $sourceInstance->initSource('crawler', 'uploaded_list'); - - // Return the prepared instance - return $sourceInstance; - } - - /** - * Processes entries in the stack. - * - * @return void - * @todo 0% done - */ - public function processStack () { - $this->partialStub('Please implement this method.'); - } -} - -// [EOF] -?> diff --git a/core b/core index 3f5eecf55..e947d4d08 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 3f5eecf55062fd4c24d483be590f38359eec5b76 +Subproject commit e947d4d080c0780f1573344736abd2699e2e462a