yii2-netdisk/commands/HelloController.php

35 lines
800 B
PHP
Raw Normal View History

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