Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <?php
  2. class Config
  3. {
  4. private static $configInstantie = null;
  5.  
  6. private $server;
  7. private $database;
  8. private $username;
  9. private $password;
  10.  
  11. private function __construct()
  12. {
  13. $this->server = "localhost";
  14. $this->database = "lesdb";
  15. $this->username = "root";
  16. $this->password = "";
  17. }
  18.  
  19. public static function getConfigInstantie()
  20. {
  21. if(is_null(self::$configInstantie))
  22. {
  23. self::$configInstantie = new Config();
  24. }
  25. return self::$configInstantie;
  26. }
  27.  
  28. public function getServer()
  29. {
  30. return $this->server;
  31. }
  32. public function getDatabase()
  33. {
  34. return $this->database;
  35. }
  36. public function getUsername()
  37. {
  38. return $this->username;
  39. }
  40. public function getPassword()
  41. {
  42. return $this->password;
  43. }
  44. }
  45. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement