framework/web/Response.php
protected function prepareBody()
    {
        $body = $this->body;

        $result = $body;

        if ($this->isJson() && (is_array($body) || is_object($body))) {
            $result = json_encode(\pwf\helpers\ArrayHelper::toArray($body));
        }

        return $result;
    }
protected function prepareBody()
    {
        $body = $this->body;

        $result = $body;

        if ($this->isJson() && (is_array($body) || is_object($body))) {
            $result = json_encode(\pwf\helpers\ArrayHelper::toArray($body));
        }

        return $result;
    }
protected function prepareBody ( ) { $ body = $ this -> body ; $ result = $ body ; if ( $ this -> isJson ( ) && ( is_array ( $ body ) || is_object ( $ body ) ) ) { $ result = json_encode ( \ pwf \ helpers \ ArrayHelper :: toArray ( $ body ) ) ; } return $ result ; }
Prepare response body for sending

@return string
Prepare response body for sending