Git Product home page Git Product logo

Comments (4)

mwillbanks avatar mwillbanks commented on June 29, 2024

I'm not certain that this is really the place to put it, it's certainly already possible by using a container and the manual instantiation vs. the factory instantiation. The problem you will start to run into is where does that stop for hooking everything?

Basically the factories should be mostly interchangeable and adding implementation logic on each one can lead to highly customized factories that ultimately do several things that are just simply proxying methods.

On one hand, it makes configurability via configuration far quicker but on the other hand, it makes for more of a maintainability nightmare - especially for future versions. I would say customized handling such as this should be done manually. But feel free to disagree :)

from zend-expressive-platesrenderer.

stefanotorresi avatar stefanotorresi commented on June 29, 2024

i think the problem is that right now there is no way to configure the PlatesEngine because it's not accessible anywhere, and the renderer factory always instantiate a new one rather than pulling one from the container.
so as it stands, the implementation is quite closed, and to customize the engine one would need to replace the whole renderer factory, which is odd.

from zend-expressive-platesrenderer.

stormwild avatar stormwild commented on June 29, 2024

I would say customized handling such as this should be done manually.

I understand, I was hoping it would have been good to have it enabled for the skeleton by default.

from zend-expressive-platesrenderer.

weierophinney avatar weierophinney commented on June 29, 2024

While I get the objections that @mwillbanks raises, the fact is that
"asset" helpers are already enabled by default in both the twig and
zend-view implementations. As such, we likely should enable them for
plates.

I see two ways to do so:

  • add functionality to the factory for registering them; we have this in
    both the other implementations already (extensions in twig, helpers for
    zend-view).
  • allow pulling the base plates engine instance via a factory (which would
    allow configuring it in an application-specific factory)

Anybody want to start a pull request?
On Dec 12, 2015 10:09 PM, "Alexander R Torrijos" [email protected]
wrote:

I would say customized handling such as this should be done manually.

I understand, I was hoping it would have been good to have it enabled for
the skeleton by default.


Reply to this email directly or view it on GitHub
#3 (comment)
.

from zend-expressive-platesrenderer.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.