2017 © Pedro Peláez
 

library console

Utilities for working with Symfony's Console component and Task

image

task/console

Utilities for working with Symfony's Console component and Task

  • Tuesday, September 8, 2015
  • by mbfisher
  • Repository
  • 2 Watchers
  • 2 Stars
  • 15,046 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 3 % Grown

The README.md

task/console

Build Status Coverage Status, (*1)

Example

use Some\Application;
use Task\Plugin\Console\ApplicationPlugin;

$project->inject(function ($container) {
    $app = new Application;
    $container['app'] = new ApplicationPlugin($app)
});

$project->addTask('run', ['app', function ($app) {
    $app->command('run')
        ->setVerbose(true)
        ->pipe($this->getOutput());
}]);

Installation

Add to composer.json:, (*2)

...
"require-dev": {
    "task/console" "~0.2"
}
...

Usage

ApplicationPlugin::command() returns a CommandRunner which dynamically builds up command arguments and options with setter methods., (*3)

Given the following InputDefinition:, (*4)

[
    new InputOption('option', 'o', InputOption::VALUE_REQUIRED),
    new InputOption('flag', 'f', InputOption::VALUE_NONE),
    new InputArgument('arg', InputArgument::REQUIRED)
]

```php $project->addTask('run', ['app', function ($app) { $app->command('run') ->setOption('foo') ->setFlag(true) ->setArg('wow') ->pipe($this->getOutput()); }]);, (*5)

The Versions

08/09 2015

dev-master

9999999-dev

Utilities for working with Symfony's Console component and Task

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Fisher

08/09 2015

v0.4.0

0.4.0.0

Utilities for working with Symfony's Console component and Task

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Fisher

22/05 2014

v0.3.1

0.3.1.0

Utilities for working with Symfony's Console component and Task

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Fisher

26/04 2014

v0.3.0

0.3.0.0

Utilities for working with Symfony's Console component and Task

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Fisher

25/04 2014

v0.2.0

0.2.0.0

Utilities for working with Symfony's Console component and Task

  Sources   Download

MIT

The Requires

 

by Mike Fisher

23/04 2014

v0.1.0

0.1.0.0

Utilities for working with Symfony's Console component and Task

  Sources   Download

MIT

The Requires

 

by Mike Fisher