public function __construct(StorageInterface $storage)
 {
     if ($storage instanceof self) {
         throw new \InvalidArgumentException('Inner storage must not a LoggedStorage instance.');
     }
     $this->storage = $storage;
     $this->logs = new Buffer();
     $this->logs->setEol("\n\n");
 }
 /**
  * (non-PHPdoc)
  * @see \MwbExporter\Writer\WriterInterface::open()
  */
 public function open($filename)
 {
     if ($this->opened) {
         $this->close();
     }
     $this->indentation = 0;
     $this->buffer->clear();
     $this->filename = $filename;
     $this->opened = true;
     return $this;
 }
 public function begin()
 {
     parent::begin();
     $this->aggregate->clear();
 }