src/SVGCreator/Element.php
private function factoryElement($type) {
			switch ( $type ) {
				case \SVGCreator\Element::CIRCLE:
					return new \SVGCreator\Elements\Circle();
					break;
				case \SVGCreator\Element::DEFS:
					return new \SVGCreator\Elements\Defs();
					break;
				case \SVGCreator\Element::GROUP:
					return new \SVGCreator\Elements\Group();
					break;
				case \SVGCreator\Element::LINE:
					return new \SVGCreator\Elements\Line();
					break;
				case \SVGCreator\Element::MARKER:
					return new \SVGCreator\Elements\Marker();
					break;
				case \SVGCreator\Element::PATH:
					return new \SVGCreator\Elements\Path();
					break;
				case \SVGCreator\Element::RECT:
					return new \SVGCreator\Elements\Rect();
					break;
				case \SVGCreator\Element::SVG:
					return new \SVGCreator\Elements\Svg();
					break;
				case \SVGCreator\Element::TEXT:
					return new \SVGCreator\Elements\Text();
					break;
				case \SVGCreator\Element::POLYGON:
					return new \SVGCreator\Elements\Polygon();
					break;
				default:
					throw new \SVGCreator\SVGException("The tag " . $type . " is not implemented yet", 1);
					break;
			}
		}
private function factoryElement($type) {
			switch ( $type ) {
				case \SVGCreator\Element::CIRCLE:
					return new \SVGCreator\Elements\Circle();
					break;
				case \SVGCreator\Element::DEFS:
					return new \SVGCreator\Elements\Defs();
					break;
				case \SVGCreator\Element::GROUP:
					return new \SVGCreator\Elements\Group();
					break;
				case \SVGCreator\Element::LINE:
					return new \SVGCreator\Elements\Line();
					break;
				case \SVGCreator\Element::MARKER:
					return new \SVGCreator\Elements\Marker();
					break;
				case \SVGCreator\Element::PATH:
					return new \SVGCreator\Elements\Path();
					break;
				case \SVGCreator\Element::RECT:
					return new \SVGCreator\Elements\Rect();
					break;
				case \SVGCreator\Element::SVG:
					return new \SVGCreator\Elements\Svg();
					break;
				case \SVGCreator\Element::TEXT:
					return new \SVGCreator\Elements\Text();
					break;
				case \SVGCreator\Element::POLYGON:
					return new \SVGCreator\Elements\Polygon();
					break;
				default:
					throw new \SVGCreator\SVGException("The tag " . $type . " is not implemented yet", 1);
					break;
			}
		}
Factory for building the several elements available

@param  string  			 $type 			The type of element to build

@return \SVGCreator\Element