Пример #1
0
 public function WFEErrorServer()
 {
     header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
     $response = new WFEResponse();
     $response->setContent(WFETemplate::render());
     return $response;
 }
Пример #2
0
 public function img($img)
 {
     $response = new WFEResponse();
     try {
         $response->setContent(WFELoader::content('public/img/' . $img));
     } catch (WFEFileNotFoundException $e) {
         WFERouter::run404();
     }
     $response->setFormat('image/' . pathinfo($img, PATHINFO_EXTENSION));
     return $response;
 }
Пример #3
0
 public function main($params)
 {
     $response = new WFEResponse();
     $response->setContent(WFETemplate::render($params));
     return $response;
 }
Пример #4
0
 public function doSomething($arg)
 {
     $response = new WFEResponse();
     $response->setContent(WFETemplate::render(array('parameter' => $arg)));
     return $response;
 }