You are here

public static function Singleton::getInstance in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/tests/_files/Singleton.php \Singleton::getInstance()
2 calls to Singleton::getInstance()
Framework_TestCaseTest::testStaticAttributesBackupPost in vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php
@depends testStaticAttributesBackupPre
Framework_TestCaseTest::testStaticAttributesBackupPre in vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php
@backupGlobals enabled @backupStaticAttributes enabled

File

vendor/phpunit/phpunit/tests/_files/Singleton.php, line 14

Class

Singleton

Code

public static function getInstance() {
  if (self::$uniqueInstance === null) {
    self::$uniqueInstance = new self();
  }
  return self::$uniqueInstance;
}