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


PHP Error::getView方法代码示例

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


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

示例1: remove

 protected function remove()
 {
     if (!$this->id) {
         $error = new Error(__METHOD__, Text::read('message.ID.error'));
         die($error->getView());
     }
     // Ajax Callback
     $this->ajaxCallback();
 }
开发者ID:sohflp,项目名称:Hooked,代码行数:9,代码来源:trait.RemoveController.php

示例2: detail

 protected function detail()
 {
     if (!$this->id) {
         $error = new Error(__METHOD__, Text::read('message.ID.error'));
         die($error->getView());
     }
     $this->myView = new AccountDetailView();
     $this->myModel = new AccountModel();
     $this->__detail();
 }
开发者ID:sohflp,项目名称:Hooked,代码行数:10,代码来源:class.Account.php

示例3: detail

 protected function detail()
 {
     if (!$this->id) {
         $error = new Error(__METHOD__, Text::read('message.ID.error'));
         die($error->getView());
     }
     $this->myView = new OrderDetailView();
     $this->myModel = new OrderModel();
     // Cria ligação com modelo de fotos
     $this->myModel->bindPhotoModel();
     $this->__detail();
     // Cria ligação com a visão de fotos
     $this->myView->bindPhotoReadOnlyView();
 }
开发者ID:sohflp,项目名称:Hooked,代码行数:14,代码来源:class.Order.php

示例4: photolist

 protected function photolist()
 {
     if (!$this->id) {
         $error = new Error(__METHOD__, Text::read('message.ID.error'));
         die($error->getView());
     }
     if ($_POST['multiple']) {
         $this->myView = new PhotoMultipleUploadView();
     } else {
         $this->myView = new PhotoSingleUploadView();
     }
     $this->myModel = new PhotoModel();
     // Ajax Callback
     $this->ajaxCallback();
 }
开发者ID:sohflp,项目名称:Hooked,代码行数:15,代码来源:trait.PhotoController.php

示例5: typelist

 protected function typelist()
 {
     if (!$this->id) {
         $error = new Error(__METHOD__, Text::read('message.ID.error'));
         die($error->getView());
     }
     $this->myModel = new ProductTypeModel();
     // Ajax Callback
     $this->ajaxCallback();
 }
开发者ID:sohflp,项目名称:Hooked,代码行数:10,代码来源:class.Product.php

示例6: modelException

 protected function modelException($message, $exception)
 {
     // Verifica qual foi a exceção para retornar mensagem ao usuário
     switch ($exception->getCode()) {
         case '23000':
             // Violação de regra
             $this->message['type'] = "error";
             $this->message['text'] = Text::read('message.model.error.constraint');
             break;
         case '42S22':
             // Coluna não encontrada
             $this->message['type'] = "error";
             $this->message['text'] = Text::read('message.model.error.unknownColumn');
             break;
         default:
             $this->message['type'] = "error";
             $this->message['text'] = Text::read('message.model.error.exception');
             break;
     }
     foreach ($exception->getTrace() as $key => $trace) {
         $stackTrace .= $key . ": " . $trace['class'] . "->" . $trace['function'] . "( )<br />";
     }
     $technical = $exception->getMessage();
     $error = new Error($stackTrace, $message, $technical);
     $this->technicalMessage = $error->getView();
 }
开发者ID:sohflp,项目名称:Hooked,代码行数:26,代码来源:class.BaseModel.php

示例7: checkAdminLogin

 private function checkAdminLogin()
 {
     if ($this->controller != 'login') {
         // 1. Verifica se o usuário está logado no sistema
         if (!$_SESSION['admLogin']) {
             header("location:" . Config::read('page.url.login'));
         }
         // 2. Verifica se a sessão não expirou por inatividade
         if ($_SESSION['admLogin']->checkInactiveSession()) {
             header("location:" . Config::read('page.url.login.inactive'));
         }
         // 3. Verifica se o usuário possui acesso a página solicitada
         foreach ($_SESSION['admLogin']->getRoles() as $parent) {
             if ($parent->rolePageID == $this->controller) {
                 $accessGranted = true;
                 break;
             }
         }
         // 3.1. Exceção: Página de atualização dos dados do próprio usuário
         if ($this->controller == 'user' && $this->action == 'detail' && $this->id == $_SESSION['admLogin']->getUserID()) {
             $accessGranted = true;
         }
         // 3.2. Exceção: Upload de fotos
         if ($this->controller == 'photo') {
             $accessGranted = true;
         }
         if (!$accessGranted) {
             $error = new Error(__METHOD__, Text::read('message.Loader.error'));
             die($error->getView());
         }
     }
 }
开发者ID:sohflp,项目名称:Hooked,代码行数:32,代码来源:class.Loader.php


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