當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Controller::options方法代碼示例

本文整理匯總了PHP中yii\console\Controller::options方法的典型用法代碼示例。如果您正苦於以下問題:PHP Controller::options方法的具體用法?PHP Controller::options怎麽用?PHP Controller::options使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在yii\console\Controller的用法示例。


在下文中一共展示了Controller::options方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: options

 public function options($id)
 {
     $options = [];
     if (in_array($id, ['start', 'restart'])) {
         $options = ['fork'];
     }
     return array_merge(parent::options($id), $options);
 }
開發者ID:shakura,項目名稱:yii2-gearman,代碼行數:8,代碼來源:GearmanController.php

示例2: options

 /**
  * 選項
  * @param string $actionID
  * @return array
  */
 public function options($actionID)
 {
     if ($actionID == 'index') {
         return array_merge(parent::options($actionID), ['phpEnv', 'processMaxNum']);
     } else {
         return parent::options($actionID);
     }
 }
開發者ID:wayhood,項目名稱:yii2-asynctask,代碼行數:13,代碼來源:AsyncTaskController.php

示例3: options

 public function options($id)
 {
     $options = parent::options($id);
     $options[] = 'fake_steal';
     $options[] = 'file_report';
     $options[] = 'continue';
     return $options;
 }
開發者ID:denisddm,項目名稱:stealer,代碼行數:8,代碼來源:StealController.php

示例4: options

 public function options($actionID)
 {
     $options = [];
     switch ($actionID) {
         case 'init':
             $options = ['force', 'noProgress'];
             break;
         case 'benchmark':
             $options = ['times'];
             break;
     }
     return array_merge($options, parent::options($actionID));
 }
開發者ID:larryli,項目名稱:ipv4-yii2,代碼行數:13,代碼來源:Ipv4Controller.php

示例5: options

 /**
  * @inheritdoc
  */
 public function options($actionId)
 {
     switch ($actionId) {
         case $actionId == 'dump' || $actionId == 'x-dump-data':
             $additionalOptions = ['noDataTables'];
             break;
         case $actionId == 'x-dump':
             $additionalOptions = ['includeTables', 'excludeTables', 'dataOnly', 'truncateTables'];
             break;
         default:
             $additionalOptions = [];
     }
     return array_merge(parent::options($actionId), $additionalOptions);
 }
開發者ID:dmstr,項目名稱:yii2-db,代碼行數:17,代碼來源:MysqlController.php

示例6: options

 public function options($actionId)
 {
     $options = [];
     switch ($actionId) {
         case 'permission':
             $options[] = 'description';
             $options[] = 'rule';
             $options[] = 'childOf';
             break;
         case 'assign':
             $options[] = 'ruleName';
             break;
     }
     return array_merge($options, parent::options($actionId));
 }
開發者ID:NewPaltzKarateAcademy,項目名稱:KIMS,代碼行數:15,代碼來源:RbacController.php

示例7: options

 /**
  * @overriding
  * @see \yii\console\Controller::options()
  */
 public function options($actionID)
 {
     empty($actionID) && ($actionID = $this->defaultAction);
     $actionOptions = ['send-queue' => ['testMode', 'serverID', 'maxSent', 'signSize', 'pageSize', 'retryTimes', 'signUnassigned', 'renewSignature', 'spamRules']];
     if (isset($actionOptions[$actionID])) {
         return array_merge(parent::options($actionID), $actionOptions[$actionID]);
     } else {
         return parent::options($actionID);
     }
 }
開發者ID:thinker-g,項目名稱:yii2-hermes-mailing,代碼行數:14,代碼來源:DefaultController.php

示例8: options

 /**
  * @inheritdoc
  */
 public function options($actionID)
 {
     return array_merge(parent::options($actionID), ['migrationPath'], $actionID === 'create' ? ['templateFile', 'templateFileGenerators', 'fields'] : []);
 }
開發者ID:Kest007,項目名稱:yii2,代碼行數:7,代碼來源:BaseMigrateController.php

示例9: options

 public function options($actionId)
 {
     $options = parent::options($actionId);
     return array_merge($options, ['startTime', 'endTime', 'existing', 'all']);
 }
開發者ID:solarpatrol,項目名稱:yii2-tle,代碼行數:5,代碼來源:TleController.php

示例10: options

 public function options($actionID)
 {
     return array_merge(parent::options($actionID), ['deleteOld', 'warehouse']);
 }
開發者ID:sangkil,項目名稱:biz3-distro,代碼行數:4,代碼來源:DataController.php

示例11: options

 public function options($actionID)
 {
     return array_merge(parent::options($actionID), ['echo', 'debug'], $actionID == 'recreate_thumbs' ? ['remove'] : []);
 }
開發者ID:guillemc,項目名稱:yii2starter,代碼行數:4,代碼來源:ImageController.php

示例12: options

 /**
  * @inheritdoc
  */
 public function options($actionId)
 {
     return array_merge(parent::options($actionId), ['y']);
 }
開發者ID:webtoucher,項目名稱:yii2-commands,代碼行數:7,代碼來源:Controller.php

示例13: options

 public function options($actionID)
 {
     $actions = ['show-permission', 'remove-child-permission', 'add-child-permission'];
     $ret = in_array($actionID, $actions) ? ['by'] : [];
     return array_merge(parent::options($actionID), $ret);
 }
開發者ID:michnaadam33,項目名稱:yii2-rbac-console,代碼行數:6,代碼來源:RbacController.php

示例14: options

 /**
  * @inheritdoc
  */
 public function options($id)
 {
     $options = parent::options($id);
     $options[] = 'overwrite';
     if (!isset($this->generators[$id])) {
         return $options;
     }
     $attributes = $this->generators[$id]->attributes;
     unset($attributes['templates']);
     return array_merge($options, array_keys($attributes));
 }
開發者ID:yangguanghui,項目名稱:yii2-extension-final,代碼行數:14,代碼來源:GenerateController.php

示例15: options

 /**
  * @inheritdoc
  */
 public function options($actionID)
 {
     return array_merge(parent::options($actionID), ['count', 'force', 'generator', 'dbprovider']);
 }
開發者ID:miksir,項目名稱:yii2-db-faker,代碼行數:7,代碼來源:FakerController.php


注:本文中的yii\console\Controller::options方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。