private function initializeReader($pathToFile) { FileHelper::ensureIsReadable($pathToFile); $this->reader = new \XMLReader(); $success = $this->reader->open($pathToFile); if (!$success) { throw new ImporterException('Ошибка открытия XML файла по адресу: ' . $pathToFile); } }