HelloController.php 688 Bytes
Newer Older
Qiang Xue committed
1 2 3 4 5 6 7 8
<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

namespace app\commands;
9

Qiang Xue committed
10 11 12
use yii\console\Controller;

/**
13
 * This command echoes the first argument that you have entered.
Qiang Xue committed
14 15
 *
 * This command is provided as an example for you to learn how to create console commands.
16
 *
Qiang Xue committed
17 18 19 20 21 22
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
 */
class HelloController extends Controller
{
	/**
Luciano Baraglia committed
23
	 * This command echoes what you have entered as the message.
Qiang Xue committed
24 25 26 27
	 * @param string $message the message to be echoed.
	 */
	public function actionIndex($message = 'hello world')
	{
Qiang Xue committed
28
		echo $message . "\n";
Qiang Xue committed
29
	}
Luciano Baraglia committed
30
}