Exemplo n.º 1
0
 /**
  * Inner write.
  *
  * @param Docolight\Http\Contracts\Arrayable $body
  * @param boolean                            $replace
  *
  * @return \Docolight\Http\Response
  */
 protected function innerWrite(Arrayable $body, $replace = false)
 {
     if ($replace === true) {
         $this->body = $body;
     } elseif ($replace === false) {
         $this->body->fill($body->castToArray());
     }
     return $this;
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function convertToStringRepresentation(Arrayable $body)
 {
     return json_encode($body->castToArray());
 }