I would like to run a custom command from the default framework installation via yiic.
Since the current yiic does not make use YII_CONSOLE_COMMANDS if you do not include a $config I can't create my custom application skeleton (with the config).
This would be my requested feature, yiic should simply take a look in the YII_CONSOLE_COMMANDS path:
Index: framework/yiic.php
===================================================================
--- framework/yiic.php (Revision 3332)
+++ framework/yiic.php (Arbeitskopie)
@@ -19,15 +19,15 @@
require_once(dirname(__FILE__).'/yii.php');
-if(isset($config))
-{
+if(isset($config)) {
$app=Yii::createConsoleApplication($config);
$app->commandRunner->addCommands(YII_PATH.'/cli/commands');
- $env=@getenv('YII_CONSOLE_COMMANDS');
- if(!empty($env))
- $app->commandRunner->addCommands($env);
}
else
$app=Yii::createConsoleApplication(array('basePath'=>dirname(__FILE__).'/cli'));
+$env=@getenv('YII_CONSOLE_COMMANDS');
+if(!empty($env))
+ $app->commandRunner->addCommands($env);
+
$app->run();
\ No newline at end of fileIt would be also an alternative if I could specify the commandPath for yiic, like
$ /path/to/yii/framework/yiic --commandPath=/path/to/my/commands p3webapp p3
Any objections?
Best regards,
schmunk

Help














