private function setContent($content)
    {
        $this->content = $content;

        if (empty($this->contentType)) {
            return;
        }

        //Remove charset from Content-Type
        if (strpos($this->contentType, ';') !== false) {
            list($mime, $charset) = array_map('trim', explode(';', $this->contentType));

            $this->contentType = $mime;
            $charset = str_replace(['"', "'"], '', substr(strstr($charset, '='), 1));
            $this->content = Utils::toUtf8($content, trim($charset));
        }
    }
private function setContent($content)
    {
        $this->content = $content;

        if (empty($this->contentType)) {
            return;
        }

        //Remove charset from Content-Type
        if (strpos($this->contentType, ';') !== false) {
            list($mime, $charset) = array_map('trim', explode(';', $this->contentType));

            $this->contentType = $mime;
            $charset = str_replace(['"', "'"], '', substr(strstr($charset, '='), 1));
            $this->content = Utils::toUtf8($content, trim($charset));
        }
    }
private function setContent ( $ content ) { $ this -> content = $ content ; if ( empty ( $ this -> contentType ) ) { return ; } //Remove charset from Content-Type if ( strpos ( $ this -> contentType , ';' ) !== false ) { list ( $ mime , $ charset ) = array_map ( 'trim' , explode ( ';' , $ this -> contentType ) ) ; $ this -> contentType = $ mime ; $ charset = str_replace ( [ '"' , "'" ] , '' , substr ( strstr ( $ charset , '=' ) , 1 ) ) ; $ this -> content = Utils :: toUtf8 ( $ content , trim ( $ charset ) ) ; } }
Set the response content.

@param string $content
Set the response content .