Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Sep 27, 2017
1 parent 8e8284d commit cf9953f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ git clone https://github.com/inhere/php-console.git // github
```php
use Inhere\Console\IO\Input;
use Inhere\Console\IO\Output;
use Inhere\Console\App;
use Inhere\Console\Application;

$meta = [
'name' => 'My Console App',
'version' => '1.0.2',
];
$input = new Input;
$output = new Output;
$app = new App($meta, $input, $output);
$app = new Application($meta, $input, $output);

// add command routes
$app->command('demo', function (Input $in, Output $out) {
Expand Down
4 changes: 2 additions & 2 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ git clone https://github.com/inhere/php-console.git // github
// file: examples/app
use Inhere\Console\IO\Input;
use Inhere\Console\IO\Output;
use Inhere\Console\App;
use Inhere\Console\Application;

$meta = [
'name' => 'My Console App',
'version' => '1.0.2',
];
$input = new Input;
$output = new Output;
$app = new App($meta, $input, $output);
$app = new Application($meta, $input, $output);

// add command routes
$app->command('demo', function (Input $in, Output $out) {
Expand Down
4 changes: 4 additions & 0 deletions examples/DemoCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use Inhere\Console\Command;
use Inhere\Console\IO\Input;
use Inhere\Console\IO\Output;

/**
* Class DemoCommand
Expand All @@ -36,6 +37,9 @@ protected function configure()

/**
* description text by annotation. it is invalid when configure() is exists
* @param Input $input
* @param Output $output
* @return int|void
*/
public function execute($input, $output)
{
Expand Down

0 comments on commit cf9953f

Please sign in to comment.