Coder Social home page Coder Social logo

Comments (3)

g105b avatar g105b commented on June 14, 2024

It would be useful if the extraArgs overwrote the Injector when looking for a matching class instance. If there was already a XYZ class in the ServiceContainer, providing a new instance of XYZ to extraArgs would prefer to use this one.

This means we could provide one of two things:

  1. provide a default instance of the ComponentBinder so when there's no specific instance provided, an exception is thrown saying something like "A ComponentBinder can only be used within a Component element's go/do functions".
  2. Rename the DocumentBinder completely to just be a Binder... then the Binder itself can be overridden when in the context of a Component.

from servicecontainer.

g105b avatar g105b commented on June 14, 2024

I like how just using a Binder everywhere enforces encapsulation, but maybe some components should be able to bind data outside of their own component element? Maybe? Maybe not... maybe they should just have access to the HTMLDocument if they need to be heavy handed with their encapsulation... (?)

from servicecontainer.

g105b avatar g105b commented on June 14, 2024

More details on the above at PhpGt/DomTemplate#470

from servicecontainer.

Related Issues (17)

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.