Internal redirects are replacements for ezcMvcResult objects:
class redirectController extends ezcMvcController
{
public function doLogout()
{
$request = clone $this->request;
$request->variables['redirUrl'] = '/new-url';
$request->variables['reasons'] = 'something was wrong';
$request->uri = '/login-required';
return new ezcMvcInternalRedirect( $request );
}
}
External redirects are done through the status property:
class redirectController extends ezcMvcController
{
public function doLogout()
{
$res = new ezcMvcResult;
$res->status = new ezcMvcExternalRedirect( '/' );
return $res;
}
}