Replies: 2 comments
-
It is for the bindings that use closures to build up concrete classes. the resolve method sees this as |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for the answer. I'm still wondering how it's supposed to work. I've tried to use it with a closure and it doesn't seem to work. Note, that binding a callable doesn't mean it's passed to
The type error is (probably) thrown from here |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm trying to understand some internals of Laravel Container. I've seen, the parameter $abstract to
Container::resolve
as well asContainer::make
is declared to bestring|callable
.What's the use of
callable
there? Is it intentional? The $abstract is used withinresolve()
as a key to access array items. I guess, this is not supposed to work (supposedly, it will result withFatal error: Illegal offset type
).So my question is: is this
callable
intentional, or it's there just by accident?Beta Was this translation helpful? Give feedback.
All reactions