On Tuesday, September 26, 2017 at 4:17:38 AM UTC-5, Xedin Unknown wrote:
>
> `Template#file()` seems extra to me, because it breaks ISP.
>

This method is used by the Context to be able to determine whether the data 
it contains actually applies to the template.
 

> `Engine` also looks very non-segregated to me.
>

Engine is basically what ties everything together to give a single entry 
point in to the the rendering system. This would effectively be the 
Renderer.
 

> Could you elaborate on the usage of `Context`? I couldn't understand how 
> it could be used.
>

You used DataObject in an earlier email to describe the same thing, 
Context's hold the data that the templates will use. Context's in this case 
have additional functionality in that they can conditionally provide their 
data to the template based off of the templates name. This gives the 
ability to globally create data, and have a specific only get that data.
 

> I use an interop context in the form of `ContainerInterface`.
>

I didn't want to tie any other interfaces in to this system if it could be  
avoided, preferring to be self-contained. I feel like requiring a 
container, or logger, should be a decision that the frameworks should be 
making.

It seems like we may already be close to how it should work, mainly naming 
differences, and a few extraneous methods/classes.

My idea when originally building this spec was to do the smallest possible 
interface for a rendering system. I would then pitch this to the framework 
authors, and hopefully gain traction from them to support the interop 
project, before coming here. This would let us easily swap out rendering 
systems if they adopted this interface.

As I mentioned previously, here are the code examples I've written

   - Phrender: https://github.com/dlundgren/phrender
   - Bridge Proof of Concept: 
   https://github.com/dlundgren/output-interop-poc


Dave

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/882fe11b-02e1-4c63-bbba-91e34018044a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to