Exemplo n.º 1
0
Arquivo: Base.php Projeto: apolev/fias
 public function __construct($wsdlUrl, $fileDirectory)
 {
     $this->wsdlUrl = $wsdlUrl;
     $this->fileDirectory = $fileDirectory;
     FileHelper::ensureIsDirectory($fileDirectory);
     FileHelper::ensureIsWritable($fileDirectory);
 }
Exemplo n.º 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);
     }
 }