class Singleton in Zircon Profile 8
Same name and namespace in other branches
Hierarchy
- class \Singleton
Expanded class hierarchy of Singleton
File
- vendor/phpunit/ phpunit/ tests/ _files/ Singleton.php, line 2 
View source
class Singleton {
  private static $uniqueInstance = null;
  protected function __construct() {
  }
  private final function __clone() {
  }
  public static function getInstance() {
    if (self::$uniqueInstance === null) {
      self::$uniqueInstance = new self();
    }
    return self::$uniqueInstance;
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| Singleton:: | private static | property | ||
| Singleton:: | public static | function | ||
| Singleton:: | final private | function | ||
| Singleton:: | protected | function | 
