You are here

Singleton.php in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 vendor/phpunit/phpunit/tests/_files/Singleton.php

File

vendor/phpunit/phpunit/tests/_files/Singleton.php
View source
<?php

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;
  }

}

Classes

Namesort descending Description
Singleton