Requirements ¶
Yii 1.1.8 or above
Usage ¶
You can attach CConsole component in the application configuration file (components section) or use as separate object.
Run yii console command:
$console = new CConsole();
$async = true;
$console->runCommand('newsdelivery', array('param1', 'param2'), $async);
Run *nix shell command:
$console = new CConsole();
$async = false;
$console->exec('ping 8.8.8.8', $async);
Run *nix shell command with forwarded input/output:
$console = new CConsole();
$redirectOutput = true;
$console->pasthru('sudo aptitude install git', $redirectOutput);
“C” prefix is for yii ; use another one
all yii classes is prefixed by "C" . you can choose another one like : E ...
Nice
Very nice extension, thanks!
Rocks!
Big time.
Re: “C” prefix is for yii ; use another one
I choose class names with prefix "C" for my extensions only when know what class must be in a core of yiiframework.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.