示例#1
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     //parent::__construct($opts);
     // TODO Shold session management be handled this way?
     $sessionid = session_id();
     if (empty($sessionid)) {
         session_start();
     }
     $this->config = api_config::getInstance();
     $this->request = api_request::getInstance();
     $this->db = api_database::factory();
 }
示例#2
0
 function __construct()
 {
     try {
         $this->request = api_request::getInstance();
         //            echo "<pre>";
         //            print_r( $this->request);
         $this->response = api_response::getInstance();
         $this->loadRoutes();
     } catch (api_exception $e) {
         $this->catchFinalException($e);
     } catch (Exception $e) {
         $this->catchFinalException($e);
     }
 }