hosiplan/nette-autowire-properties

Lazy-Autowire of properties for Nette PresenterComponents.

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

This package is not auto-updated.

Last update: 2024-11-23 13:42:31 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;

    // ..
}