private function __construct() { // fetch current page $page = '/'; if (isset($_REQUEST['page'])) { $page = trim($_REQUEST['page']); } // update pages $this->page = $page; $this->config = Config::getInstance(); // get instance of Template $this->template = new Template(); $this->posts = Posts::getInstance(); $this->cache = Cache::getInstance(); $this->route(); }
public function __construct() { $this->config = Config::getInstance(); $this->posts = Posts::getInstance(); }