* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, Registerable {
- /**
- * "Cached" CSV path
- */
- private $csvFilePath = '';
-
- /**
- * Last CSV file instance
- */
- private $lastCsvFileInstance = NULL;
-
- /**
- * Stack for pushing data from this clas to another
- */
- private $stackSourceInstance = NULL;
-
/**
* Stack name for a CSV file
*/
*/
const CRAWL_ENTRY_SIZE = 3;
+ /**
+ * "Cached" CSV path
+ */
+ private $csvFilePath = '';
+
+ /**
+ * Last CSV file instance
+ */
+ private $lastCsvFileInstance = NULL;
+
+ /**
+ * Stack for pushing data from this clas to another
+ */
+ private $stackSourceInstance = NULL;
+
/**
* "Imported" CSV files
*/
self::CRAWL_JOB_ARRAY_EXTERNAL_DEPTH => $csvData[2]
);
+ // Then add more data to it
+ $this->enrichCrawlerQueueData($csvData);
+
// Debug message
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE [' . __METHOD__ . ':' . __LINE__ . ']: EXIT!');
}
}
/**
- * Processes entries in the stack.
+ * Fills the URL stack with new entries from source
*
* @return void
- * @todo ~20% done
+ * @todo ~40% done
*/
- public function processStack () {
+ public function fillUrlStack () {
// Does the stack have some entries left?
if ($this->isCsvEntryAdded()) {
/*
* depth, handling of 3rd-party URLs and such.
*/
$this->addCsvFile();
- } elseif (!$this->isUrlStackEmpty()) {
- /*
- * Handle next entry. This method will be called very often, so need
- * to process more than one entry at a time.
- */
- $this->processNextEntry();
}
$this->partialStub('Please implement this method.');