public function _procError($e, $request, $xcontext) { $xcontext->errormsg = $e->getMessage(); if ($e instanceof CommonException) { $xcontext->bkurl = $e->backURL; } if ($e instanceof XMvcNotFound) { if ($e->getCode() == XMvcNotFound::ACTION) { header("Location: /index.php?do=login"); } } return XNext::useTpl("error.html"); }
public function _procError($e, $request, $xcontext) { $xcontext->errormsg = $e->getMessage(); return XNext::useTpl("myerror.html"); }
public function _run($request, $xcontext) { //return XNext::useTpl('index.html'); return XNext::action("listbook"); }
public function _run($request, $xcontext) { echo "This is Admin Demo"; return XNext::nothing(); }
public function _run($request, $xcontext) { $authorService = new AuthorService(); $xcontext->authorList = $authorService->lists(); $this->logger->info("Get all authors " . count($xcontext->authorList)); $this->logger->info("Show add book page."); return XNext::useTpl("book/add.html"); }
public function _run($request, $xcontext) { $this->logger->info("Show addauthor page"); return XNext::useTpl("author/add.html"); }