From: Roland Haeder Date: Thu, 5 Mar 2015 21:07:22 +0000 (+0100) Subject: Continued with crawler: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e0a65506b5a811314892dcc400eb18cf54947394;p=hub.git Continued with crawler: - Made some noisy debug lines quiet (commented out) - Added parseCsvEntry() as a stub (only debug lines) - Some other minor improvements Signed-off-by: Roland Haeder --- diff --git a/application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php b/application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php index 6283a46c7..2084887bb 100644 --- a/application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php +++ b/application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php @@ -105,12 +105,12 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R $directoryEntry = $this->getDirectoryInstance()->readDirectoryExcept(array_merge(array('.htaccess', '.', '..'), $this->csvFileImported)); // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE[' . __METHOD__ . ':' . __LINE__ . '] directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE[' . __METHOD__ . ':' . __LINE__ . '] directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry); // Is it empty or wrong file extension? if ((empty($directoryEntry)) || (substr($directoryEntry, -4, 4) != '.csv')) { // Skip further processing - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE[' . __METHOD__ . ':' . __LINE__ . '] directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry . ' - SKIPPED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE[' . __METHOD__ . ':' . __LINE__ . '] directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry . ' - SKIPPED!'); return FALSE; } // END - if @@ -238,12 +238,24 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R $this->getStackSourceInstance()->pushNamed(self::STACK_NAME_CSV_FILE, $csvFileInstance); // Push array on next stack - $this->getStackSourceInstance()->pushNamed(self::STACK_NAME_CSV_ENTRY, $csvFileInstance); + $this->getStackSourceInstance()->pushNamed(self::STACK_NAME_CSV_ENTRY, $csvData); // Debug message //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE [' . __METHOD__ . ':' . __LINE__ . ']: EXIT!'); } + /** + * Parses the next stacked CSV entry. + * + * @return void + */ + private function parseCsvEntry () { + // Debug message + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE [' . __METHOD__ . ':' . __LINE__ . ']: CALLED!'); + + // Debug message + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE [' . __METHOD__ . ':' . __LINE__ . ']: EXIT!'); + } /** * Getter for stackSourceInstance variable