public function toFileAsSvg($file_name) { $img = $this->_svg(); $this->_toFile($file_name, 'image/svg+xml', 'svg'); echo $img; }