Current implementation expects an url created by the framework. Otherwise the header will redirect to a "wrong" url.
public function redirect($url)
{
$this->checkIfHeadersAlreadySent();
header('Location: ' . $url);
exit();
}
It would be easier, if the method itself called url->create() to create the proper url. This means that CResponse is to be dependent on $di. But waving pros and cons I feel that its a more usable way to do like that.
Current implementation expects an url created by the framework. Otherwise the header will redirect to a "wrong" url.
It would be easier, if the method itself called url->create() to create the proper url. This means that CResponse is to be dependent on $di. But waving pros and cons I feel that its a more usable way to do like that.