Yii 1.1: cconsole

Extension contains component for working with linux, windows shell, yii shell
9 followers

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);

Resources

Total 4 comments

#13910 report it
djvibegga at 2013/07/05 07:54am
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.

#8477 report it
jmariani at 2012/06/06 08:50am
Rocks!

Big time.

#7661 report it
prchakal at 2012/04/06 12:46am
Nice

Very nice extension, thanks!

#7660 report it
yiqing95 at 2012/04/05 10:47pm
“C” prefix is for yii ; use another one

all yii classes is prefixed by "C" . you can choose another one like : E ...

Leave a comment

Please to leave your comment.

Create extension