本文整理汇总了PHP中Controller::after方法的典型用法代码示例。如果您正苦于以下问题:PHP Controller::after方法的具体用法?PHP Controller::after怎么用?PHP Controller::after使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller
的用法示例。
在下文中一共展示了Controller::after方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: after
/**
* Assigns the template [View] as the request response.
*/
public function after()
{
if ($this->_autoRender === TRUE) {
$this->response->body($this->_default->render());
}
parent::after();
}
示例2: after
/**
* The after() method is called after controller action
*
* @uses Request::is_ajax
* @uses Response::headers
*/
public function after()
{
if ($this->request->is_ajax()) {
$this->response->headers('content-type', 'application/json; charset=' . Kohana::$charset);
}
parent::after();
}
示例3: after
/**
* If auto_render is enabled and no response has yet been sent, selects
* a content view based on the controller and action name, and then
* returns the template as the request response.
*
* @return void
*/
public function after()
{
if ($this->auto_render === TRUE and !$this->request->response) {
$this->render();
}
parent::after();
}
示例4: after
public function after()
{
if ($this->template !== NULL) {
$this->request->body($this->template->render());
}
return parent::after();
}
示例5: after
public function after()
{
parent::after();
if ($this->auto_render !== TRUE) {
$this->request->response = (string) $this->content;
}
}
示例6: after
/**
* Assigns the template [View] as the request response.
*/
public function after()
{
if ($this->auto_render === true) {
$this->response->body($this->template->render());
}
parent::after();
}
示例7: after
/**
* Assigns the template [View] as the request response.
*/
public function after()
{
if ($this->auto_render === TRUE) {
$this->request->response = $this->template;
}
return parent::after();
}
示例8: after
public function after()
{
if ($this->auto_render === TRUE) {
$this->response->body($this->template->render());
}
return parent::after();
}
示例9: after
/**
* Handle Request Data persistence or output based on the request type.
*/
public function after()
{
if ($this->_handle_ajax == true) {
if ($this->request->is_ajax()) {
$return = array();
if (RD::has_messages() == false) {
$return['status'] = 'success';
$return['response'] = [''];
} else {
if (RD::get_current(RD::ERROR) != null) {
$return['status'] = 'error';
$return['errors'] = RD::get_current(RD::ERROR);
} else {
if (RD::get_current(array(RD::SUCCESS, RD::INFO)) != null) {
$return['status'] = 'success';
$return['response'] = RD::get_current(array(RD::SUCCESS, RD::INFO, RD::WARNING));
} else {
$return['status'] = 'success';
$return['response'] = RD::get_current();
}
}
}
$this->response->headers('Content-Type', 'application/json');
$this->response->body(json_encode($return));
} else {
//otherwise flash the messages so they can be used on the next page load
if (RD::has_messages()) {
RD::persist();
}
parent::after();
}
} else {
parent::after();
}
}
示例10: after
/**
* Assigns the content [View] as the request response.
*/
public function after()
{
if ($this->_view instanceof View) {
$this->response->body($this->_view->render());
}
parent::after();
}
示例11: after
public function after()
{
parent::after();
if ($this->auto_render === TRUE) {
$this->response->body($this->view->render());
}
}
示例12: after
public function after()
{
if ($this->auto_render) {
Jx_Event::post($this, 'beforeRender', $this->template);
$this->request->response = $this->template;
}
return parent::after();
}
示例13: after
public function after()
{
parent::after();
if ($this->cache === TRUE && $this->request->status === 200 && $this->session->user->manage_dash_mods === null) {
$cache = new Cache($this->cache_config);
$cache->set($this->request->uri . ' :: ' . $this->session->group, $this->request->response, $this->cache_tag, $this->cache_lifetime);
}
}
示例14: after
public function after()
{
parent::after();
$handle = $this->server->handle();
if (Request::is_amf()) {
$this->response->body($handle);
}
}
示例15: after
public function after()
{
$this->view->controller = $this->getRequest()->getController();
$this->view->action = $this->getRequest()->getAction();
$this->view->template = str_replace(DOC_ROOT, '', $this->view->getView());
// Load parent::after to render this controller.
parent::after();
}