zendframework/zf2 — pull request #5267 by pursehouse (2013-10-14 18:00:07+00:00)
Title: toUrl() & toRoute() statusCode parameter

This change sets the statusCode response header as a parameter that the toUrl() accepts, instead of the "302" being a hard coded value inside the method, which requires extra overhead/code of an override when the developer does not want a 302.

example of
$this->redirect()->toUrl( '/sent/to/here' )->setStatusCode(301);
changed to
$this->redirect()->toUrl( '/sent/to/here', 301);