Ejemplo n.º 1
0
 public function __construct(ConnectionInterface $db, $table, array $fields, $isTemp = true)
 {
     if (!$table) {
         throw new ImporterException('Не задана таблица для импорта');
     }
     if (!$fields) {
         throw new ImporterException('Не заданы поля для импорта.');
     }
     $this->db = $db;
     $this->fields = $fields;
     $this->table = $table;
     if ($isTemp) {
         $this->table .= '_xml_importer';
         DbHelper::createTable($this->db, $this->table, $this->fields, $isTemp);
     }
 }