hosiplan/nette-autowire-properties

Lazy-Autowire of properties for Nette PresenterComponents.

Installs: 686

Dependents: 0

Stars: 9

Watchers: 3

Open Issues: 1

Language: PHP

v0.1.1 2012-12-21 13:52 UTC

README

You shouldn't be using this, if you don't know what youre doing!

discussion: http://forum.nette.org/cs/13084-presentery-property-lazy-autowire-na-steroidech#p93574

Include in application

abstract class BasePresenter extends Nette\Application\UI\Presenter
{
    use \Kdyby\AutowireProperties;

}

Usage

class ArticlePresenter extends BasePresenter
{
    /**
     * @autowire
     * @var App\ArticleRepository
     */
    protected $articleRepository;

    // ..
}