src/Samurai/Component/Response/HttpBody.php
public function render($with_headers = false)
    {
        $contents = array();

        // headers
        $headers = $this->getHeaders();
        if ($with_headers && $headers) {
            foreach ($headers as $key => $value) {
                $key = join('-', array_map('ucfirst', explode('-', $key)));
                $contents[] = sprintf('%s: %s', $key, $value);
            }
            $contents[] = '';
        }

        // content
        $contents[] = $this->content;

        return join("\n", $contents);
    }
public function render($with_headers = false)
    {
        $contents = array();

        // headers
        $headers = $this->getHeaders();
        if ($with_headers && $headers) {
            foreach ($headers as $key => $value) {
                $key = join('-', array_map('ucfirst', explode('-', $key)));
                $contents[] = sprintf('%s: %s', $key, $value);
            }
            $contents[] = '';
        }

        // content
        $contents[] = $this->content;

        return join("\n", $contents);
    }
public function render ( $ with_headers = false ) { $ contents = array ( ) ; // headers $ headers = $ this -> getHeaders ( ) ; if ( $ with_headers && $ headers ) { foreach ( $ headers as $ key => $ value ) { $ key = join ( '-' , array_map ( 'ucfirst' , explode ( '-' , $ key ) ) ) ; $ contents [ ] = sprintf ( '%s: %s' , $ key , $ value ) ; } $ contents [ ] = '' ; } // content $ contents [ ] = $ this -> content ; return join ( "\n" , $ contents ) ; }
build and return content string.

@access  public
@return  string
build and return content string .