public function flush() { if ($this->output_fn && $this->main_buffer) { $this->writeYaml($this->output_fn, $this->main_buffer); } foreach ($this->sub_buffers as $fn => $buffer) { $this->writeYaml($fn, $buffer); } $this->purge(); }