Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.5] Allow easy ViewFactory override #20205

Merged
merged 2 commits into from
Jul 21, 2017

Conversation

deleugpn
Copy link
Contributor

In order to implement a data interceptor between any controller with any view, I had to override the whole ViewServiceProvider::registerFactory() method.

Extracting the class instance to it's own method makes it a lot easier to override without having to worry about future changes in the default ViewServiceProvider.

/**
* Create a new Factory Instance.
*
* @param EngineResolver $resolver
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 * @param  \Illuminate\View\Engines\EngineResolver  $resolver
 * @param  \Illuminate\View\ViewFinderInterface  $finder
 * @param  \Illuminate\Contracts\Events\Dispatcher  $events
 * @return \Illuminate\View\Factory

@taylorotwell taylorotwell merged commit 878fb0c into laravel:master Jul 21, 2017
@deleugpn deleugpn deleted the override-view branch July 21, 2017 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants