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


PHP ActiveController::verbs方法代码示例

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


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

示例1: verbs

 /**
  * @inheritdoc
  */
 protected function verbs()
 {
     $verbs = parent::verbs();
     $verbs['edit'] = ['POST'];
     $verbs['detail'] = ['GET'];
     $verbs['update'] = ['PUT'];
     $verbs['restore'] = ['PATCH'];
     return $verbs;
 }
开发者ID:cookyii,项目名称:module-postman,代码行数:12,代码来源:TemplateController.php

示例2: verbs

 protected function verbs()
 {
     $verbs = parent::verbs();
     /*
      * We want to override the default verbs, because otherwise OPTIONS don't work.
      * Somehow the Yii2 documentation didn't describe reality. 
      * This fixes one of those issues.
      */
     $verbs['options'] = ['OPTIONS'];
     return $verbs;
 }
开发者ID:RHeSuS-project,项目名称:POC-service,代码行数:11,代码来源:XActiveController.php

示例3: verbs

 /**
  * @inheritdoc
  */
 public function verbs()
 {
     return parent::verbs() + ['update-collection' => ['PATCH']];
 }
开发者ID:ancor-dev,项目名称:yii2-rest,代码行数:7,代码来源:ActiveController.php

示例4: verbs

 /**
  * @inheritdoc
  */
 protected function verbs()
 {
     $verbs = parent::verbs();
     $verbs['update'] = ['POST'];
     return $verbs;
 }
开发者ID:bolom009,项目名称:testwork_api,代码行数:9,代码来源:ActiveController.php

示例5: verbs

 /**
  * @inheritdoc
  */
 protected function verbs()
 {
     $verbs = array_merge(parent::verbs(), ['save' => ['POST'], 'batch-save' => ['POST']]);
     //Override 'delete' verbs
     $verbs['delete'] = ['GET', 'DELETE'];
     return $verbs;
 }
开发者ID:fproject,项目名称:yii2-restx,代码行数:10,代码来源:ActiveController.php

示例6: verbs

 protected function verbs()
 {
     $verbs = parent::verbs();
     $verbs['roles'] = ['GET', 'HEAD'];
     return $verbs;
 }
开发者ID:ninetor,项目名称:newerp,代码行数:6,代码来源:UserController.php

示例7: verbs

 /**
  * @inheritdoc
  */
 protected function verbs()
 {
     return \yii\helpers\ArrayHelper::merge(parent::verbs(), ['index' => ['GET', 'HEAD'], 'view' => ['GET', 'HEAD'], 'create' => ['GET', 'POST', 'PUT', 'PATCH'], 'update' => ['GET', 'POST', 'PUT', 'PATCH'], 'delete' => ['GET', 'POST', 'DELETE']]);
 }
开发者ID:bennybi,项目名称:yii2-cza-base,代码行数:7,代码来源:ModelController.php

示例8: verbs

 public function verbs()
 {
     return parent::verbs();
 }
开发者ID:dawei101,项目名称:plants,代码行数:4,代码来源:ApiController.php


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