Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. class init{
  2.   protected $db;
  3.   private $cache;
  4.   private function __construct() { // tak wiem że jest prywatny ale to dla tego że ta klasa bd singletonem xD
  5.     require_once "config.php";
  6.     require_once "class/Mysqli.php";
  7.     require_once "class/cache.php";
  8.     $this->cache = new Cache();
  9.     $this->cache->test();
  10.   }
  11.   protected function link() {
  12.     $this->db = new MysqliDb (dbhost, dbuser, dbpass, dbbase);
  13.   }
  14. }
  15. class cache extends init{
  16.   public function __construct(){
  17.     $this->link();
  18.   }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement