public function __construct($filename) { $this->document = new \DOMDocument('1.0', 'UTF-8'); $this->document->formatOutput = true; $this->filename = $filename; }