orno/di — pull request #22 by dhrrgn (2014-03-26 16:19:30+00:00)
Title: Allow a simple mappings when using Config.

Currently, for simple mappings (where you only specify `class`) you have to do something like this:

``` php
[
'class' => 'Dan\Foo',
],
'request' => [
'class' => function () {
if (php_sapi_name() === 'cli') {
return new CliRequest;
}
return new WebRequest,
],
];
```

With these changes, you can change that to:

``` php
'Dan\Foo',
'request' => function () {
if (php_sapi_name() === 'cli') {
return new CliRequest;
}
return new WebRequest,
},
];
```

Much easier.