Closed eko3alpha closed 8 years ago
Just so that I am clear, you would like a object oriented wrapper around php's include ?
I guess if we Object orient it we can create a different scope so you don't leak variables from one view to the other.
I will take a look at this, sometime this week.
Closing, fixed in #19 , #21
Not so much a bug but a suggestion...
Slim2's view class had 2 methods available ( and 1 private ) in its view class. One allowed you to return a rendered template as a string, the other does what PHP-View render() effectively does.
PHP-View only has one option available
The problem with the new implementation is that I cannot render and store partials as strings to be used in other parts of the app. Before I create my own implementation thats 99% similar, I wanted to chime in to see if this feature would be added to PHP-Views.
For example there is no way for me to do this, load up a few partials "alert_view" and "content_view" and then use an "empty_wrapper"
Since making the interface like Slim2 is probably not an option as you are using render() as Slim2 display(). Maybe create a new method named:
getPartial, partial, renderPartial?
that will allow you to get the output of a rendered template as a string.