public function invokeHandler(User $user, RequestData $data) { $chapid = $data->get("chapid", NULL); $itemid = $data->get("sid", 0); if ($chapid != NULL && is_numeric($chapid)) { return Reviews::getByChapter($itemid, $chapid); } else { return null; } }