public static function getInstance($x, $y, $id, $width, $height, $style = null) { $rect = new SVGRect('<rect></rect>'); $rect->setX($x); $rect->setY($y); $rect->setWidth($width); $rect->setHeight($height); $rect->setId($id); $rect->setStyle($style); return $rect; }