1.2.7. Content Setting

public setContent(mixed $content) : static

Sets the content of the Response.

The $content may may be null, a string, a resource, an object, or anything else. How the content will be sent is determined by the Response sending logic.

The method is fluent, allowing you to chain a call to another Response method.

Note that unlike almost all the other Response methods, setContent() is not declared as final. This means you can override it in extended Response classes (though of course the signature must remain). Getting

final public getContent() : mixed

Returns the content of the Response.