public function execute(IRequest $request, IResponse $response) { $view = new HtmlTemplateView(__APP_PATH . 'views/default.php'); if ($request->issetParameter('name')) { $view->assign('name', $request->getParameter('name')); } $response->write($view->parse()); }
public function getCommand(IRequest $request) { if ($request->issetParameter('cmd')) { $cmdName = $request->getParameter('cmd'); $command = $this->_loadCommand($cmdName); if ($command instanceof ICommand) { return $command; } } $command = $this->_loadCommand($this->_defaultCommand); return $command; }