Closed ghost closed 7 years ago
I believe my readme is wrong. Because I set the decorator in the service provider it is overriding your global one since the providers are executed after it. So current solution would be to use your own service provider. Personally I have an ApplicationProvider.php
which handles stuff like this. Just make sure it comes after the presenters one in the config/app.php
.
Leave this open as I am classifying this as a bug. When I get around to it I plan to do a 2.0
update to add support for things like traits and make things easier in general.
Hi,
I was able to get the PresentableInterface and getPresenter() plugin style working but I am not able to get the "Extending the Decorator" style working.
Here is what I am doing :
App::make('presenter.decorator', App::share(function($app) { $decorator = new (PATH TO DECORATOR CLASS)\Decorator; Robbo\Presenter\Presenter::setExtendedDecorator($decorator); return $decorator; }));