static function &getInstance() { if (self::$instance === false) { self::$instance = new self(); } return self::$instance; }
/** * 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; }
public static function getInstance() { if( !isset( self::$instance ) ) { self::$instance = new Header(); } return self::$instance; }