ThreadedFactory::getInstance PHP Method

getInstance() public static method

public static getInstance ( ) : ThreadedFactory
return ThreadedFactory
    public static function getInstance()
    {
        if (self::$instance === null) {
            global $threadedFactoryInstance;
            if ($threadedFactoryInstance instanceof ThreadedFactory) {
                self::$instance = $threadedFactoryInstance;
            } else {
                new ThreadedFactory();
            }
        }
        return self::$instance;
    }