Advertisement
Guest User

Untitled

a guest
Apr 21st, 2014
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. class foo
  2. {
  3. publc static function hello()
  4. {
  5. return "HI";
  6. }
  7. }
  8.  
  9. foo::hello()
  10.  
  11. class Database extends PDO
  12. {
  13. private static $_instance = null;
  14.  
  15. private function __construct() {
  16. parent::__construct(APP_DB_DSN, APP_DB_USER, APP_DB_PASSWORD);
  17. }
  18.  
  19. public static function getInstance() {
  20. if(!(self::$_instance instanceof Database)) {
  21. self::$_instance = new Database();
  22. }
  23.  
  24. return self::$_instance;
  25. }
  26. }
  27.  
  28. function hello() {
  29. return "HI";
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement