예제 #1
0
 /**
  * Render the selected script
  * @param RestServer $rest 
  * @return RestServer
  */
 function show(RestServer $rest)
 {
     ob_start();
     $params = $this->props;
     include $this->file;
     $content = ob_get_clean();
     $rest->getResponse()->setResponse($content);
     return $rest;
 }
예제 #2
0
 public function show(RestServer $rest)
 {
     $r = "Method=" . $rest->getRequest()->getMethod() . "\n";
     $r .= "URI=" . $rest->getRequest()->getRequestURI() . "\n";
     foreach ($rest->getRequest()->getGET() as $key => $value) {
         $r .= "GET[" . $key . "]=" . $value . "\n";
     }
     foreach ($rest->getRequest()->getPOST() as $key => $value) {
         $r .= "POST[" . $key . "]=" . $value . "\n";
     }
     $rest->getResponse()->setResponse(nl2br($r));
     return $rest;
 }