用代码来表示,就是:
//从这种形式
class ACommand extends CConsoleCommand {
public function actionFoo($arg1, $aaa){
}
public function actionBar($arg1, $aaa){
}
}
//改成这种形式
class ACommand extends CConsoleCommand {
public $argAaa = null;
public function actionFoo($arg1){
}
public function actionBar($arg1){
}
}
用文字来表述,就是在Command运行的时候动态指定初始化参数。