public function getMail($request) { $check = $this->checkDetails($request); if ($check) { $customersObject = new Customers(); $array = $customersObject->getCustomerEmail($request["restaurantID"], $request["customerID"]); return $array; } else { return $check; } }