Skip to content

Commit

Permalink
fixed installation instructions
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
fprochazka committed May 9, 2015
1 parent 75b4ab3 commit 33bed37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Installation
The best way to install Kdyby/Autowired is using [Composer](http://getcomposer.org/):

```sh
$ composer require kdyby/autowired:~1.0
$ composer require kdyby/autowired
```


Expand Down
11 changes: 6 additions & 5 deletions docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Quickstart
The best way to install Kdyby/Autowired is using [Composer](http://getcomposer.org/):

```sh
$ composer require kdyby/autowired:@dev
$ composer require kdyby/autowired
```


Expand All @@ -28,11 +28,12 @@ abstract class BasePresenter extends Nette\Application\UI\Presenter
}
```

For debugging purposes you may also add the AutowiredExtension in bootstrap.php.
For debugging purposes you may also add the AutowiredExtension in config, which registers Tracy panel


```php
\Kdyby\Autowired\DI\AutowiredExtension::register();
extensions:
autowired: Kdyby\Autowired\DI\AutowiredExtension
```


Expand Down Expand Up @@ -97,12 +98,12 @@ class ArticlePresenter extends BasePresenter
}
```

The `$name` parameter can be omitted, `createComponentDatagrid(IDatagridFactory $factory)` works as well.
The `$name` parameter can be omitted, `createComponentDatagrid(IDatagridFactory $factory)` works as well.

Cool right?


Not so clean...
---------------

Just keep in mind, that is not a clean approach - it's pragmatic. Never try to use theese traits in model classes. Strictly use constructor injection whenever it's possible!
Just keep in mind, that is not a clean approach - it's pragmatic. Never try to use these traits in model classes. Strictly use constructor injection whenever it's possible!

0 comments on commit 33bed37

Please sign in to comment.