public function getAllProducts() { $modell = new Model(); $productsArray = $modell->getAllProducts(); echo json_encode($productsArray); }