Last active
January 4, 2016 22:19
-
-
Save rowatt/8687139 to your computer and use it in GitHub Desktop.
Singleton Class Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
SINGLETON::get_instance(); | |
class SINGLETON extends Presi_Core_Class | |
{ | |
private static $instance = NULL; | |
public static function get_instance() | |
{ | |
NULL === self::$instance and self::$instance = new self; | |
return self::$instance; | |
} | |
private function __construct() | |
{ | |
//construct here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment