當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。