loadConfig(); $this->db = new DB($this, $this->getConfig('db_engine', 'mysql')); session_start(); $this->session = $_SESSION; session_write_close(); } private function loadConfig() { global $config; $this->config = &$config; } public function getRequest($name, $default = null) { $return = $default; if (isset($_POST[$name])) { $return = $_POST[$name]; } else { if (isset($_GET[$name])) { $return = $_GET[$name]; } } return $return; } public function getConfig($name, $default = null) { if (!isset($this->config[$name])) { return $default; } else { return $this->config[$name]; } } public function setSessionBase($name, $value) { session_start(); $_SESSION[$name] = $value; session_write_close(); } public function setSession($name, $value) { $this->session[$name] = $value; session_start(); $_SESSION = $this->session; session_write_close(); } public function getSession($name, $default = null) { if (!isset($this->session[$name])) { return $default; } else { return $this->session[$name]; } } public function debug($var) { echo "
"; var_dump($var); echo ""; } public function sessionDestroy() { session_start(); session_destroy(); } public function getPageSize() { return 10; } } ?>