yii2-netdisk/commands/HelloController.php

34 lines
771 B
PHP
Raw Normal View History

2013-05-24 10:14:49 -04: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 18:35:15 +04:00
2013-05-24 10:14:49 -04:00
use yii\console\Controller;
use yii\console\ExitCode;
2013-05-24 10:14:49 -04: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.
*/
public function actionIndex($message = 'hello world')
{
echo $message . "\n";
return ExitCode::OK;
2014-03-16 10:46:16 +06:00
}
2013-07-21 11:39:32 -03:00
}