public function setContent($content, $code = 200)
    {
        $this->content = $content ? $content : '';
        $this->statusCode = $code;
        if (!is_scalar($content)) {
            $this->toJson();
        }

        return $this;
    }
public function setContent($content, $code = 200)
    {
        $this->content = $content ? $content : '';
        $this->statusCode = $code;
        if (!is_scalar($content)) {
            $this->toJson();
        }

        return $this;
    }
public function setContent ( $ content , $ code = 200 ) { $ this -> content = $ content ? $ content : '' ; $ this -> statusCode = $ code ; if ( ! is_scalar ( $ content ) ) { $ this -> toJson ( ) ; } return $ this ; }
Set response content.

@param string $content
@param int $code

@return $this
Set response content .