-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Provide specific objects on individual invocation #140
Comments
It would be useful if the This means we could provide one of two things:
|
I like how just using a |
More details on the above at phpgt/DomTemplate#470 |
We already have this:
https://github.com/PhpGt/ServiceContainer/blob/master/src/Injector.php#L26C24-L26C24
This
$extraArgs
parameter is currently not used anywhere, as I've never found a use for matching a parameter by string.I think we should drop this functionality completely, and replace the function of
$extraArgs
.At the point of invocation, I would like to be able to pass a specific object, so we can have DomTemplate Components with their own PHP, solving the issue described in phpgt/DomTemplate#331
When a DomTemplate Component is detected, the
invoke
function of theInjector
should be called with a few extra indices of$extraArgs
: TheGt\Dom\Element
of the component, and a newComponentBinder
(the same as aDocumentBinder
, but with a pre-constrained context element of the current component).This would be a fabulous addition to WebEngine development!
The text was updated successfully, but these errors were encountered: