src/Rasterization/SVGRasterizer.php
private static function createDependencies()
    {
        if (isset(self::$renderers)) {
            return;
        }

        self::$renderers = array(
            'rect'      => new Renderers\SVGRectRenderer(),
            'line'      => new Renderers\SVGLineRenderer(),
            'ellipse'   => new Renderers\SVGEllipseRenderer(),
            'polygon'   => new Renderers\SVGPolygonRenderer(),
            'image'     => new Renderers\SVGImageRenderer(),
            'text'      => new Renderers\SVGTextRenderer(),
        );

        self::$pathParser       = new Path\SVGPathParser();
        self::$pathApproximator = new Path\SVGPathApproximator();
    }
private static function createDependencies()
    {
        if (isset(self::$renderers)) {
            return;
        }

        self::$renderers = array(
            'rect'      => new Renderers\SVGRectRenderer(),
            'line'      => new Renderers\SVGLineRenderer(),
            'ellipse'   => new Renderers\SVGEllipseRenderer(),
            'polygon'   => new Renderers\SVGPolygonRenderer(),
            'image'     => new Renderers\SVGImageRenderer(),
            'text'      => new Renderers\SVGTextRenderer(),
        );

        self::$pathParser       = new Path\SVGPathParser();
        self::$pathApproximator = new Path\SVGPathApproximator();
    }
private static function createDependencies ( ) { if ( isset ( self :: $ renderers ) ) { return ; } self :: $ renderers = array ( 'rect' => new Renderers \ SVGRectRenderer ( ) , 'line' => new Renderers \ SVGLineRenderer ( ) , 'ellipse' => new Renderers \ SVGEllipseRenderer ( ) , 'polygon' => new Renderers \ SVGPolygonRenderer ( ) , 'image' => new Renderers \ SVGImageRenderer ( ) , 'text' => new Renderers \ SVGTextRenderer ( ) , ) ; self :: $ pathParser = new Path \ SVGPathParser ( ) ; self :: $ pathApproximator = new Path \ SVGPathApproximator ( ) ; }
Makes sure the singleton static variables are all instantiated.

This includes registering all of the standard renderers, as well as
preparing the path parser and the path approximator.

@return void
Makes sure the singleton static variables are all instantiated .