36 lines
516 B
PHP
36 lines
516 B
PHP
|
<?php
|
||
|
|
||
|
namespace Aviat\Ion\View;
|
||
|
|
||
|
use Aura\Web\ResponseSender;
|
||
|
|
||
|
use Aviat\Ion\View as BaseView;
|
||
|
|
||
|
class HttpView extends BaseView {
|
||
|
|
||
|
/**
|
||
|
* Do a redirect
|
||
|
*
|
||
|
* @param string $url
|
||
|
* @param int $code
|
||
|
* @return void
|
||
|
*/
|
||
|
public function redirect($url, $code)
|
||
|
{
|
||
|
$this->response->redirect->to($url, $code);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Send the appropriate response
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
protected function output()
|
||
|
{
|
||
|
parent::output();
|
||
|
|
||
|
$sender = new ResponseSender($this->response);
|
||
|
$sender->__invoke();
|
||
|
}
|
||
|
|
||
|
}
|