public static function get_instance() { if (self::$instance == null) { self::$instance = new self(); } return self::$instance; }
$product_name = "null"; } if (isset($_GET["product_category"])) { $product_category = $_GET["product_category"]; } else { $product_category = "null"; } $cont->searchProductByGET($product_name, $product_category); } else { if ($_GET['function'] == "searchProduct") { $ret['message'] = "Undefined Product name or category"; $ret['status_code'] = 404; print json_encode($ret); } else { if ($_GET['function'] == "viewAll") { $cont = new controllers(); $cont->viewAllByGET(); } else { $ret['message'] = "Undefined function"; $ret['status_code'] = 404; print json_encode($ret); } } } } else { $ret['message'] = "Wrong Method GET"; $ret['status_code'] = 404; print json_encode($ret); } } else { $ret['message'] = "Wrong Method";
public function __construct() { parent::__construct(); }
public function __construct() { parent::__construct(); $this->utils->session(); // starts session }
public function __destruct() { parent::__destruct(); }