ThreadedFactory::getInstance PHP Méthode

getInstance() public static méthode

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