igorcarvalho/silex-console-service-provider

Use the console like all commands into Symfony\Console

1.0.0 2014-10-31 16:53 UTC

This package is not auto-updated.

Last update: 2024-04-23 01:03:50 UTC


README

This packaget provides a Symfony\Component\Console to the Silex base at version 2.0.*

Install

Put in the igor822/silex-console-service-provider in your composer.json and register the service:

$app->register(new \Carvinc\Provider\ConsoleServiceProvider(), [
    'console.name' => 'Test',
    'console.version' => '0.0.1'
]);

Usage

Use the console like all commands into Symfony\Console:

$ ./console command

Add Command

All your Command Classes should extend Carvinc\Command\Command to have access of Silex\Application by following method

  • getSilexApplication, which returns the Application