public function toSVG() { $this->svg = new SVG(); $this->generateBackground(); $this->generatePattern(); return (string) $this->svg; }