HelloController.php 715 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
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
 */
class HelloController extends Controller
{
22 23 24 25 26 27 28 29
    /**
     * This command echoes what you have entered as the message.
     * @param string $message the message to be echoed.
     */
    public function actionIndex($message = 'hello world')
    {
        echo $message . "\n";
    }
Luciano Baraglia committed
30
}