PHPackages                             jonsa/pimple-console - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jonsa/pimple-console

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jonsa/pimple-console
====================

Pimple Console ServiceProvider

v2.0.0(9y ago)0288↓100%MITPHP

Since Oct 7Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jonsa/pimple-console)[ Packagist](https://packagist.org/packages/jonsa/pimple-console)[ RSS](/packages/jonsa-pimple-console/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

Pimple Console ServiceProvider
==============================

[](#pimple-console-serviceprovider)

Installation
------------

[](#installation)

Add the console provider to your `composer.json` using the command line.

```
composer require jonsa/pimple-console

```

Configuration
-------------

[](#configuration)

```
use Pimple\Container;
use Jonsa\PimpleConsole\ServiceProvider;

$container = new Container();
$container->register(new ServiceProvider(), array(
    /**
     * Set the console application name. Defaults to 'Console'
     * @param string
     */
    'console.name' => 'My Console Application',
    /**
     * Set the console application version. Defaults to '1.0'
     * @param string
     */
    'console.version' => '2.0',
    /**
     * Set the event dispatcher. Either a dispatcher instance or a string where
     * a dispatcher can be found in the container.
     * @param string|\Symfony\Component\EventDispatcher\EventDispatcherInterface
     */
    'console.event_dispatcher' => new \Symfony\Component\EventDispatcher\EventDispatcher(),
    /**
     * Set XDebug in jit mode. Adds the --debug option to all commands.
     * Only applicable if XDebug is available.
     * @param bool
     */
    'console.enable_xdebug' => true,
));
```

Usage
-----

[](#usage)

Create a script in your project and setup the Pimple container manually.

```
#!/usr/bin/env php
