public function __construct() { // Init parent contructor parent::__construct(); // obtain a new database Object to control database $this->db = new Database(); // Initiate Database connection $this->db->connect(); //call View to convert the list into json code $this->view = View::get_view(); }