::VIEWTYPE_* constants * @throws {@link InvalidTypeException} */ public function __construct($page = '', $viewType = View::VIEWTYPE_HTML) { parent::__construct($page, $viewType); $this->viewFactory = PanaceaViewFactory::getInstance(); } /** * Handles the specified request, and generates a * suitable response * * @author Tommy Montgomery * @since 2008-10-05 * @uses Request::create() * @uses HttpUtil::getRequestMethod() * * @throws {@link InvalidRequestException} if a {@link View} cannot be created * @return View */ public function handleRequest(Request $request = null) { if (!($request instanceof Request)) { $request = Request::create(HttpUtil::getRequestMethod()); } try { return $this->viewFactory->getView($this->page, $request->__toString()); } catch (ClassNotFoundException $e) { throw new InvalidRequestException($request); } } } ?>