This file contains hidden or 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
| class ${ClassName} { | |
| protected static $instance; | |
| /** | |
| * Returns an instance of this Singleton | |
| * @return ${ClassName} | |
| */ | |
| public static function getInstance() { | |
| if(!isset(self::$instance)) { | |
| self::$instance = new self(); |
This file contains hidden or 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 | |
| /** | |
| * Example database from flyspray | |
| * | |
| * @author Bouke Haarsma <[email protected]> | |
| */ | |
| mysql_connect("localhost", "(user)", "(pass)"); | |
| mysql_select_db("(db)"); |
NewerOlder