Create singleton instance for this class

@return \BFW\Request
514480
public static function getInstance(): Request
    {
        if (self::$instance === null) {
            $calledClass    = get_called_class(); //Autorize extends this class
            self::$instance = new $calledClass;
        }

        return self::$instance;
    }
1166732
public function build(): RequestChildNodesRequest
	{
		$instance = new RequestChildNodesRequest();
		if ($this->nodeId === null) {
			throw new BuilderException('Property [nodeId] is required.');
		}
		$instance->nodeId = $this->nodeId;
		$instance->depth = $this->depth;
		$instance->pierce = $this->pierce;
		return $instance;
	}
1067111
public function build(): GetSnapshotRequest
	{
		$instance = new GetSnapshotRequest();
		if ($this->computedStyleWhitelist === null) {
			throw new BuilderException('Property [computedStyleWhitelist] is required.');
		}
		$instance->computedStyleWhitelist = $this->computedStyleWhitelist;
		$instance->includeEventListeners = $this->includeEventListeners;
		$instance->includePaintOrder = $this->includePaintOrder;
		$instance->includeUserAgentShadowTree = $this->includeUserAgentShadowTree;
		return $instance;
	}
116546
public static function singleton()
    {
        $returnValue = null;

        
        $cacheName = get_called_class();
        if (!isset(self::$instances[$cacheName])) {
        	self::$instances[$cacheName] = new $cacheName();
        }
        
        $returnValue = self::$instances[$cacheName];
        

        return $returnValue;
    }
672064
public function newInstance()
    {
        $class = $this->entityMap->getClass();

        if ($this->entityMap->useDependencyInjection()) {
            return $this->newInstanceUsingDependencyInjection($class);
        }

        return $this->newInstanceUsingInstantiator($class);
    }
979136
public static function instance() {
        global $CFG;
        if (is_null(self::$singletoninstance)) {
            if (!empty($CFG->perfdebug) and $CFG->perfdebug > 7) {
                self::$singletoninstance = new performance_measuring_filter_manager();
            } else {
                self::$singletoninstance = new self();
            }
        }
        return self::$singletoninstance;
    }
1012567
public function build(): CloseRequest
	{
		$instance = new CloseRequest();
		if ($this->handle === null) {
			throw new BuilderException('Property [handle] is required.');
		}
		$instance->handle = $this->handle;
		return $instance;
	}
828479
public function create()
    {
        $instance = self::createFixedRateShipping($this);
        $this->setId($instance->getId());
        return $instance;
    }
343672
public function create()
    {
        $instance = self::createOrder($this);
        $this->setId($instance->getId());
        return $instance;
    }
973904
public function build(): StartPreciseCoverageRequest
	{
		$instance = new StartPreciseCoverageRequest();
		$instance->callCount = $this->callCount;
		$instance->detailed = $this->detailed;
		return $instance;
	}
412
public static function getInstance ()
    {
        // If this class is used for multiple singletons, we need to keep
        // track of multiple singleton objects, one for each class name
        static $instances = array();

        // Get class name to use. Use late static binding here,
        // if method is overriden by derived classes.
        $singletonClassName = static::_getInstanceClassName();

        // If already instantiated, use that
        if (isset($instances[$singletonClassName])) {
            return $instances[$singletonClassName];
        }

        // Otherwise create new instance
        $instances[$singletonClassName] = new $singletonClassName (static::_getInstanceFuseValue());

        return $instances[$singletonClassName];
    }
1277108
public function build(): QuerySelectorAllRequest
	{
		$instance = new QuerySelectorAllRequest();
		if ($this->nodeId === null) {
			throw new BuilderException('Property [nodeId] is required.');
		}
		$instance->nodeId = $this->nodeId;
		if ($this->selector === null) {
			throw new BuilderException('Property [selector] is required.');
		}
		$instance->selector = $this->selector;
		return $instance;
	}
76880
public static function singleton()
	{
		if(!isset(self::$instance))
		{
			$className = SESSION_CLASS;
			self::$instance = new $className;
		}
		
		return self::$instance;
	}
378259
public static function getInstance()
    {
        if (is_null(self::$instance)) {
            throw new \RuntimeException('You must first create the singleton instance with createInstance().');
        }
        self::$instance->setGlobalsFromSugar();
        self::$instance->chdirToSugarDir();

        return self::$instance;
    }
72720
public function newInstance()
    {
        $class = get_called_class();
        $instance = new $class();
        $instance->setSerializer($this->getSerializer());
        $instance->setItemConverter($this->getItemConverter()->newInstance());
        return $instance;
    }
474784
public function create()
    {
        $instance = self::createPaymentToken($this);
        $this->setId($instance->getId());
        return $instance;
    }
275111
public function build(): SetSinkToUseRequest
	{
		$instance = new SetSinkToUseRequest();
		if ($this->sinkName === null) {
			throw new BuilderException('Property [sinkName] is required.');
		}
		$instance->sinkName = $this->sinkName;
		return $instance;
	}