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


PHP BaseController::httpError方法代码示例

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


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

示例1: voted

 public function voted()
 {
     if ($this->exist_validation->fails()) {
         return BaseController::httpError($this->exist_validation);
     } else {
         if ($this->vote_check->missingVote()) {
             return BaseController::httpNotFound();
         } else {
             return BaseController::httpOk();
         }
     }
 }
开发者ID:Reval63,项目名称:projet_photo,代码行数:12,代码来源:VoteController.php

示例2: destroy

 public function destroy()
 {
     if ($this->delete_validation->fails()) {
         return BaseController::httpError($this->delete_validation);
     } else {
         if ($this->follow_check->missing()) {
             return BaseController::httpNotfound();
         } else {
             $this->follow_gestion->destroy();
             BaseController::httpOk();
         }
     }
 }
开发者ID:Reval63,项目名称:projet_photo,代码行数:13,代码来源:FollowController.php

示例3: update

 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     if ($this->update_validation->fails($id)) {
         return BaseController::httpError($this->update_validation);
     } else {
         if ($this->group_check->update($id)) {
             return BaseController::httpNotFound();
         } else {
             $this->group_gestion->update($id);
             return BaseController::httpOk();
         }
     }
 }
开发者ID:Reval63,项目名称:projet_photo,代码行数:19,代码来源:GroupController.php

示例4: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy()
 {
     if ($this->delete_validation->fails()) {
         return BaseController::httpError($this->delete_validation);
     } elseif (!$this->friend_check->exist()) {
         return BaseController::httpNotFound();
     } else {
         $this->friend_gestion->destroy();
         return BaseController::httpOk();
     }
 }
开发者ID:Reval63,项目名称:projet_photo,代码行数:17,代码来源:FriendController.php

示例5: voteFeed

 public function voteFeed()
 {
     if ($this->list_validation->fails()) {
         return BaseController::httpError($this->list_validation);
     } else {
         return BaseController::httpContent($this->post_gestion->voteFeed(), 'vote_feed');
     }
 }
开发者ID:Reval63,项目名称:projet_photo,代码行数:8,代码来源:PostController.php

示例6: activate

 /**
  * Activate a specified user.
  *
  * @param  int  $id
  * @return Response
  */
 public function activate()
 {
     if ($this->activate_validation->fails()) {
         return BaseController::httpError($this->activate_validation);
     } else {
         if ($this->user_check->badToken()) {
             return BaseController::httpNotFound();
         } else {
             $this->user_gestion->activate();
             return BaseController::httpOk();
         }
     }
 }
开发者ID:Reval63,项目名称:projet_photo,代码行数:19,代码来源:UserController.php


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