/** * Return the request data based on this form's request method * * @return array */ protected function getRequestData() { if (strtolower($this->request->getMethod()) === $this->getMethod()) { return $this->request->{'get' . ($this->request->isPost() ? 'Post' : 'Query')}(); } return array(); }
/** * Return the request data based on given form's request method * * @param Form $page The page to fetch the data for * @param Request $request The request to fetch the data from * * @return array */ protected function getRequestData(Form $page, Request $request) { if (strtolower($request->getMethod()) === $page->getMethod()) { return $request->{'get' . ($request->isPost() ? 'Post' : 'Query')}(); } return array(); }