HummingBirdAnimeClient/src/Aviat/Ion/View/HttpView.php

36 lines
516 B
PHP
Raw Normal View History

2015-09-17 23:11:18 -04:00
<?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();
}
}