2017 © Pedro Peláez
 

library console-service-provider

Console Service Provider for Silex Applications

image

lexpress/console-service-provider

Console Service Provider for Silex Applications

  • Thursday, September 26, 2013
  • by GromNaN
  • Repository
  • 6 Watchers
  • 6 Stars
  • 1,788 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Console Service Provider for Silex

The ConsoleServiceProvider enable Symfony Console in Silex make easy to register command from any other service provider., (*1)

Parameters

  • console.name (optional): The name of your application.
  • console.version (optional): The version of your application.

Services

  • console: The Console Application. Use $app['console']->run().

Registering

Installation:, (*2)

  • Use the official Git repository (https://github.com/LExpress/ConsoleServiceProvider);
  • Install it via Composer (lexpress/console-service-provider on Packagist).

Register the service provider in your Silex application., (*3)

$app->register(new LExpress\Silex\ConsoleServiceProvider(), array(
    'console.name'    => 'Wahou',
    'console.version' => '1.0',
));

Register commands

Services named with command.* are automatically registered to the console., (*4)

$app['command.propel.model.build'] = $app->share(function ($app) {
    return new Propel\Generator\Command\ModelBuildCommand();
});

Running the console application

The Console Application is available in your Silex Application with the service alias console. To run it, you can create an executable file in your project., (*5)

#!/usr/bin/env php
<?php

// Load the class loader
require __DIR__.'/vendor/autoload.php';

// Initialize your application with the ConsoleServiceProvider
$app = require __DIR__.'/app.php';

// Run the console with the default input/output
$app['console']->run();

License

ConsoleServiceProvider is licensed under the MIT license., (*6)

The Versions

26/09 2013

dev-master

9999999-dev

Console Service Provider for Silex Applications

  Sources   Download

MIT

The Requires

 

by Jérôme Tamarelle

23/09 2013

v1.0.0

1.0.0.0

Console Service Provider for Silex Applications

  Sources   Download

MIT

The Requires

 

by Jérôme Tamarelle

15/09 2013

v1.0-RC

1.0.0.0-RC

Console Service Provider for Silex Applications

  Sources   Download

The Requires

 

by Jérôme Tamarelle