/** * Automatically generated run method * * @param Request $request * @return Response */ public function run(Request $request) { $params = new Parameters($request->query->all()); $domain = new ActivityDomain($this->getServiceContainer()); $payload = $domain->paginate($params); return $this->responder->run($request, $payload); }
/** * Automatically generated run method * * @param Request $request * @return Response */ public function run(Request $request) { $id = $this->getParam('id'); $domain = new ActivityDomain($this->getServiceContainer()); $payload = $domain->delete($id); return $this->responder->run($request, $payload); }
/** * Automatically generated run method * * @param Request $request * @return Response */ public function run(Request $request) { $body = Json::decode($request->getContent()); if (!isset($body['data'])) { throw new InvalidParameterException(); } $data = $body['data']; $domain = new ActivityDomain($this->getServiceContainer()); $payload = $domain->create($data); return $this->responder->run($request, $payload); }