示例#1
0
文件: Response.php 项目: RETFU/RREST
 /**
  * Get a router configured response with:
  * - content serialize
  * - success status code
  * - header Content-Type
  * - header Location.
  *
  * @param bool $autoSerializeContent
  *
  * @return mixed
  */
 public function getRouterResponse($autoSerializeContent = true)
 {
     $content = $this->getContent();
     if ($autoSerializeContent) {
         $content = $this->serialize($content, $this->getFormat());
     }
     return $this->router->getResponse($content, $this->getConfiguredHeaderstatusCode(), $this->getConfiguredHeaders());
 }
示例#2
0
文件: RREST.php 项目: RETFU/RREST
 protected function hintHTTPPayloadBody($hintedPayloadBody)
 {
     $this->router->setPayloadBodyValue($hintedPayloadBody);
 }