function getNextFile() { Applog::log("INSIDE " . __FILE__ . ' - ' . __CLASS__ . '::' . __FUNCTION__ . '() - ' . 'line ' . __LINE__, 4); while (1) { $crawledPage = CrawledPage::getNextDiacriticsFile(); if ($crawledPage == null) { return null; } $this->showProcessingFileStatus($crawledPage); FilesUsedInDiacritics::save2Db($crawledPage->id); if (is_file($crawledPage->parsedTextPath) || $crawledPage->httpStatus < 400) { return $this->toLower(file_get_contents($crawledPage->parsedTextPath)); } } return null; }