2013-05-24 10:14:49 -04:00
|
|
|
<?php
|
|
|
|
/**
|
2023-05-07 12:08:51 +03:00
|
|
|
* @link https://www.yiiframework.com/
|
2013-05-24 10:14:49 -04:00
|
|
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
2023-05-07 12:08:51 +03:00
|
|
|
* @license https://www.yiiframework.com/license/
|
2013-05-24 10:14:49 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace app\commands;
|
2013-07-21 18:35:15 +04:00
|
|
|
|
2013-05-24 10:14:49 -04:00
|
|
|
use yii\console\Controller;
|
2017-11-08 09:58:56 +01:00
|
|
|
use yii\console\ExitCode;
|
2013-05-24 10:14:49 -04:00
|
|
|
|
|
|
|
/**
|
2013-12-17 00:27:33 +01:00
|
|
|
* This command echoes the first argument that you have entered.
|
2013-05-24 10:14:49 -04:00
|
|
|
*
|
|
|
|
* This command is provided as an example for you to learn how to create console commands.
|
2013-11-27 20:19:56 +02:00
|
|
|
*
|
2013-05-24 10:14:49 -04:00
|
|
|
* @author Qiang Xue <qiang.xue@gmail.com>
|
|
|
|
* @since 2.0
|
|
|
|
*/
|
|
|
|
class HelloController extends Controller
|
|
|
|
{
|
2014-03-16 10:46:16 +06:00
|
|
|
/**
|
|
|
|
* This command echoes what you have entered as the message.
|
|
|
|
* @param string $message the message to be echoed.
|
2018-02-06 12:26:06 +03:00
|
|
|
* @return int Exit code
|
2014-03-16 10:46:16 +06:00
|
|
|
*/
|
|
|
|
public function actionIndex($message = 'hello world')
|
|
|
|
{
|
|
|
|
echo $message . "\n";
|
2017-11-08 09:58:56 +01:00
|
|
|
|
|
|
|
return ExitCode::OK;
|
2014-03-16 10:46:16 +06:00
|
|
|
}
|
2013-07-21 11:39:32 -03:00
|
|
|
}
|