public function getProductByName($name) { $this->mProducts = Product::GetProductByName($name); echo json_encode($this->mProducts); }