~fusonic/chive/1.1

« back to all changes in this revision

Viewing changes to yii/cli/commands/ShellCommand.php

  • Committer: Matthias Burtscher
  • Date: 2010-02-12 09:12:35 UTC
  • Revision ID: matthias.burtscher@fusonic.net-20100212091235-jqxrb62klx872ajc
* Updated Yii to 1.1.0
* Removed CodePress and CodeMirror
* Updated jQuery and some plugins
* Cleaned some code ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 *
5
5
 * @author Qiang Xue <qiang.xue@gmail.com>
6
6
 * @link http://www.yiiframework.com/
7
 
 * @copyright Copyright &copy; 2008-2009 Yii Software LLC
 
7
 * @copyright Copyright &copy; 2008-2010 Yii Software LLC
8
8
 * @license http://www.yiiframework.com/license/
9
 
 * @version $Id: ShellCommand.php 1161 2009-06-22 18:36:59Z qiang.xue $
 
9
 * @version $Id: ShellCommand.php 1678 2010-01-07 21:02:00Z qiang.xue $
10
10
 */
11
11
 
12
12
/**
13
13
 * ShellCommand executes the specified Web application and provides a shell for interaction.
14
14
 *
15
15
 * @author Qiang Xue <qiang.xue@gmail.com>
16
 
 * @version $Id: ShellCommand.php 1161 2009-06-22 18:36:59Z qiang.xue $
 
16
 * @version $Id: ShellCommand.php 1678 2010-01-07 21:02:00Z qiang.xue $
17
17
 * @package system.cli.commands
18
18
 * @since 1.0
19
19
 */
30
30
 
31
31
DESCRIPTION
32
32
  This command allows you to interact with a Web application
33
 
  on the command line. It provides tools to automatically
 
33
  on the command line. It also provides tools to automatically
34
34
  generate new controllers, views and data models.
35
35
 
36
36
  It is recommended that you execute this command under
93
93
 
94
94
                $yiiVersion=Yii::getVersion();
95
95
                echo <<<EOD
96
 
Yii Interactive Tool v1.0 (based on Yii v{$yiiVersion})
 
96
Yii Interactive Tool v1.1 (based on Yii v{$yiiVersion})
97
97
Please type 'help' for help. Type 'exit' to quit.
98
98
EOD;
99
99
                $this->runShell();
127
127
                $_runner_=new CConsoleCommandRunner;
128
128
                $_runner_->addCommands(dirname(__FILE__).'/shell');
129
129
                $_runner_->addCommands(Yii::getPathOfAlias('application.commands.shell'));
 
130
                if(($_path_=@getenv('YIIC_SHELL_COMMAND_PATH'))!==false)
 
131
                        $_runner_->addCommands($_path_);
130
132
                $_commands_=$_runner_->commands;
131
133
 
132
134
                while(($_line_=$this->readline("\n>> "))!==false)