Example #1
0
File: Base.php Project: apolev/fias
 public function __construct($wsdlUrl, $fileDirectory)
 {
     $this->wsdlUrl = $wsdlUrl;
     $this->fileDirectory = $fileDirectory;
     FileHelper::ensureIsDirectory($fileDirectory);
     FileHelper::ensureIsWritable($fileDirectory);
 }
Example #2
0
 private function initializeReader($pathToFile)
 {
     FileHelper::ensureIsReadable($pathToFile);
     $this->reader = new \XMLReader();
     $success = $this->reader->open($pathToFile);
     if (!$success) {
         throw new ImporterException('Ошибка открытия XML файла по адресу: ' . $pathToFile);
     }
 }