Exemple #1
0
 static function &getInstance()
 {
     if (self::$instance === false) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Exemple #2
0
 /**
  * Return an instance of Header.
  *
  * @return      Header                          Instance of Header
  */
 public static function getInstance()
 {
     // Lazy initialization: create the object at the first request
     if (empty(self::$instance)) {
         // Create an instance of Header
         self::$instance = new self();
     }
     // Return the instance
     return self::$instance;
 }
Exemple #3
0
	public static function getInstance() {
		if( !isset( self::$instance ) ) {
			self::$instance = new Header();
		}
		return self::$instance;
	}