Pop\Mvc\Controller::setResponse PHP Method

setResponse() public method

Set the response object
public setResponse ( Pop\Http\Response $response ) : Controller
$response Pop\Http\Response
return Controller
    public function setResponse(Response $response)
    {
        $this->response = $response;
        return $this;
    }

Usage Example

Exemplo n.º 1
0
 public function testSetAndGetResponse()
 {
     $c = new Controller();
     $c->setResponse(new Response(200, array('Content-Type' => 'text/html')));
     $this->assertEquals(200, $c->getResponse()->getCode());
 }