Exemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function start()
 {
     if (!$this->file) {
         throw new \LogicException('Set a file first');
     }
     if ($this->writer) {
         throw new \LogicException('Writer already started');
     }
     $this->writer = new BaseXmlWriter();
     $this->writer->openUri($this->file->getPathname());
     $this->writer->setIndent($this->indent);
     $this->writer->startDocument('1.0', 'UTF-8');
     $this->write(sprintf('<%s>', $this->rootNode));
 }