yii2-netdisk/commands/HelloController.php

35 lines
802 B
PHP
Raw Permalink Normal View History

2013-05-24 22:14:49 +08:00
<?php
/**
2023-05-07 17:08:51 +08:00
* @link https://www.yiiframework.com/
2013-05-24 22:14:49 +08:00
* @copyright Copyright (c) 2008 Yii Software LLC
2023-05-07 17:08:51 +08:00
* @license https://www.yiiframework.com/license/
2013-05-24 22:14:49 +08:00
*/
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
}