public function setContent($content)
    {
        if (!is_scalar($content)) {
            $content = json_encode($content, JSON_PRETTY_PRINT);
        }

        if (is_bool($content)) {
            $content = $content ? '1': '0';
        }

        if (is_null($content)) {
            $content = '';
        }

        return $this->set('body', $content);
    }
public function setContent($content)
    {
        if (!is_scalar($content)) {
            $content = json_encode($content, JSON_PRETTY_PRINT);
        }

        if (is_bool($content)) {
            $content = $content ? '1': '0';
        }

        if (is_null($content)) {
            $content = '';
        }

        return $this->set('body', $content);
    }
public function setContent ( $ content ) { if ( ! is_scalar ( $ content ) ) { $ content = json_encode ( $ content , JSON_PRETTY_PRINT ) ; } if ( is_bool ( $ content ) ) { $ content = $ content ? '1' : '0' ; } if ( is_null ( $ content ) ) { $ content = '' ; } return $ this -> set ( 'body' , $ content ) ; }
Sets the content

@param *mixed $content Can it be an array or string please?

@return ResponseInterface
Sets the content