Skip to content

Commit

Permalink
Merge pull request #14 from holtkamp/patch-1
Browse files Browse the repository at this point in the history
Use __invoke() instead of execute()
  • Loading branch information
mnapoli committed Jun 9, 2015
2 parents df547fa + 4bbb282 commit a35534d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/php-di.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ $ composer require mnapoli/silly-php-di
Thanks to PHP-DI's autowiring capabilities you can define your commands in classes:

```php
use Symfony\Component\Console\Output\OutputInterface;

class MyCommand
{
public function execute($name, OutputInterface $output)
public function __invoke($name, OutputInterface $output)
{
if ($name) {
$text = 'Hello, '.$name;
Expand Down

0 comments on commit a35534d

Please sign in to comment.