本文整理汇总了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);
}
示例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);
}
}
示例3: options
public function options($id)
{
$options = parent::options($id);
$options[] = 'fake_steal';
$options[] = 'file_report';
$options[] = 'continue';
return $options;
}
示例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));
}
示例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);
}
示例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));
}
示例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);
}
}
示例8: options
/**
* @inheritdoc
*/
public function options($actionID)
{
return array_merge(parent::options($actionID), ['migrationPath'], $actionID === 'create' ? ['templateFile', 'templateFileGenerators', 'fields'] : []);
}
示例9: options
public function options($actionId)
{
$options = parent::options($actionId);
return array_merge($options, ['startTime', 'endTime', 'existing', 'all']);
}
示例10: options
public function options($actionID)
{
return array_merge(parent::options($actionID), ['deleteOld', 'warehouse']);
}
示例11: options
public function options($actionID)
{
return array_merge(parent::options($actionID), ['echo', 'debug'], $actionID == 'recreate_thumbs' ? ['remove'] : []);
}
示例12: options
/**
* @inheritdoc
*/
public function options($actionId)
{
return array_merge(parent::options($actionId), ['y']);
}
示例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);
}
示例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));
}
示例15: options
/**
* @inheritdoc
*/
public function options($actionID)
{
return array_merge(parent::options($actionID), ['count', 'force', 'generator', 'dbprovider']);
}