当前位置: 首页>>代码示例>>PHP>>正文


PHP Controller::after方法代码示例

本文整理汇总了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();
 }
开发者ID:panchao1,项目名称:cronsystem,代码行数:10,代码来源:Template.php

示例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();
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:13,代码来源:autocomplete.php

示例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();
 }
开发者ID:evansd-archive,项目名称:kohana3-module--utilities,代码行数:14,代码来源:layout.php

示例4: after

 public function after()
 {
     if ($this->template !== NULL) {
         $this->request->body($this->template->render());
     }
     return parent::after();
 }
开发者ID:nergal,项目名称:kohana-libs,代码行数:7,代码来源:abstract.php

示例5: after

 public function after()
 {
     parent::after();
     if ($this->auto_render !== TRUE) {
         $this->request->response = (string) $this->content;
     }
 }
开发者ID:andygoo,项目名称:kohana,代码行数:7,代码来源:Devtools.php

示例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();
 }
开发者ID:s4urp8n,项目名称:kohana-admin,代码行数:10,代码来源:Template.php

示例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();
 }
开发者ID:abdul-baten,项目名称:hbcms,代码行数:10,代码来源:template.php

示例8: after

 public function after()
 {
     if ($this->auto_render === TRUE) {
         $this->response->body($this->template->render());
     }
     return parent::after();
 }
开发者ID:slumbersoul,项目名称:gnw-weixin,代码行数:7,代码来源:template.php

示例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();
     }
 }
开发者ID:happydemon,项目名称:req,代码行数:38,代码来源:Req.php

示例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();
 }
开发者ID:nguyennv,项目名称:kohana-common,代码行数:10,代码来源:base.php

示例11: after

 public function after()
 {
     parent::after();
     if ($this->auto_render === TRUE) {
         $this->response->body($this->view->render());
     }
 }
开发者ID:Hinton,项目名称:langify,代码行数:7,代码来源:base.php

示例12: after

 public function after()
 {
     if ($this->auto_render) {
         Jx_Event::post($this, 'beforeRender', $this->template);
         $this->request->response = $this->template;
     }
     return parent::after();
 }
开发者ID:jonlb,项目名称:JxCMS,代码行数:8,代码来源:site.php

示例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);
     }
 }
开发者ID:pedrosland,项目名称:kohana-cache,代码行数:8,代码来源:controller.php

示例14: after

 public function after()
 {
     parent::after();
     $handle = $this->server->handle();
     if (Request::is_amf()) {
         $this->response->body($handle);
     }
 }
开发者ID:elrolito,项目名称:zendamf-for-kohana,代码行数:8,代码来源:amf.php

示例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();
 }
开发者ID:atlas1308,项目名称:testtesttestfarm,代码行数:8,代码来源:render.php


注:本文中的Controller::after方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。