BoundMethod
class BoundMethod (View source)
Methods
Call a method that has been bound to the container.
Normalize the given callback into a Class@method string.
Get all dependencies for a given method.
Get the proper reflection instance for the given callback.
Get the dependency for the given call parameter.
Determine if the given string is in Class@method syntax.
Details
static mixed
call(Container $container, callable|string $callback, array $parameters = [], string|null $defaultMethod = null)
Call the given Closure / class@method and inject its dependencies.
static protected mixed
callClass(Container $container, string $target, array $parameters = [], string|null $defaultMethod = null)
Call a string reference to a class using Class@method syntax.
static protected mixed
callBoundMethod(Container $container, callable $callback, mixed $default)
Call a method that has been bound to the container.
static protected string
normalizeMethod(callable $callback)
Normalize the given callback into a Class@method string.
static protected array
getMethodDependencies(Container $container, callable|string $callback, array $parameters = [])
Get all dependencies for a given method.
static protected ReflectionFunctionAbstract
getCallReflector(callable|string $callback)
Get the proper reflection instance for the given callback.
static protected void
addDependencyForCallParameter(Container $container, ReflectionParameter $parameter, array $parameters, array $dependencies)
Get the dependency for the given call parameter.
static protected bool
isCallableWithAtSign(mixed $callback)
Determine if the given string is in Class@method syntax.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.