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


PHP ControllerBase::initalize方法代码示例

本文整理汇总了PHP中ControllerBase::initalize方法的典型用法代码示例。如果您正苦于以下问题:PHP ControllerBase::initalize方法的具体用法?PHP ControllerBase::initalize怎么用?PHP ControllerBase::initalize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ControllerBase的用法示例。


在下文中一共展示了ControllerBase::initalize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: indexAction

 public function indexAction()
 {
     parent::initalize();
     //echo (new \Phalcon\Debug\Dump())->variable($this,'this');
     //echo (new \Phalcon\Debug\Dump())->variable($this->request,'request');
     //echo (new \Phalcon\Debug\Dump())->variable($this->view,'view');
     $this->view->router = json_encode($this->router);
     echo $this->view->render('index/index');
 }
开发者ID:jstacoder,项目名称:phlaskr-phalcon,代码行数:9,代码来源:IndexController.php

示例2: registerAction

 public function registerAction()
 {
     parent::initalize();
     //echo '<link rel=stylesheet href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" />';
     $user = new Users();
     if ($this->request0 > isPost() && $this->request->getPost('password') == $this->request->getPost('confirm')) {
         $user->name = $this->request->getPost('name');
         $user->email = $this->request->getPost('email');
         $user->setPassword($this->request->getPost('password'));
         $success = $user->save();
         if ($success) {
             echo $this->flash->success("Thanks for registering {$user->email}");
         } else {
             echo $this->flash->error("error");
             foreach ($user->getMessages() as $msg) {
                 echo $this->flash->error($msg);
             }
         }
         $this->dispatcher->forward(array("controller" => "signup", "action" => "index"));
     }
 }
开发者ID:jstacoder,项目名称:phlaskr-phalcon,代码行数:21,代码来源:SignupController.php

示例3: initalize

 public function initalize()
 {
     parent::initalize();
 }
开发者ID:jstacoder,项目名称:phlaskr-phalcon,代码行数:4,代码来源:LoginController.php


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