FacadeHelper
class FacadeHelper
| internal |
Finds the method a facade's static call runs without running application code: neither the accessor nor the root is executed.
The root's class is read from the booted container only where a registration shows the exact
class built. Factories, extenders and self-building classes can return other objects, so beyond
a factory that is a single new they leave the root unknown.
Traits
Properties
| protected Container|null | $container | from HasContainer |
Methods
Create a new facade helper instance.
Get the container key the facade resolves, or null when its accessor does not return one constant.
Get the exact class the facade's root is built as, or null when it is not known.
Get the method a static call on the facade runs: the facade's own public method, else its root's, or null when the root or the facade's forwarding is unknown.
Determine whether the facade forwards static calls it doesn't declare to its root. Hash's and Crypt's __callStatic() forward as Facade's does, keeping the arguments out of stack traces; another can forward the call anywhere.
Get the method the call runs on each class it may be made on.
Details
in
HasContainer at line 19
void
setContainer(Container $container)
Set the container used for resolution.
in
HasContainer at line 27
Container
getContainer()
Return the current container.
in
HasContainer at line 35
mixed
resolve(string $abstract)
Resolve the given type from the container.
at line 80
__construct(ReflectionProvider $reflectionProvider, Parser $parser, RuntimeInputs $runtimeInputs)
Create a new facade helper instance.
at line 93
string|null
getAccessor(ClassReflection $facade, Scope $scope)
Get the container key the facade resolves, or null when its accessor does not return one constant.
at line 109
string|null
getRootClass(ClassReflection $facade, Scope $scope)
Get the exact class the facade's root is built as, or null when it is not known.
at line 130
ExtendedMethodReflection|null
getMethod(ClassReflection $facade, string $name, Scope $scope)
Get the method a static call on the facade runs: the facade's own public method, else its root's, or null when the root or the facade's forwarding is unknown.
at line 155
static bool
forwardsToRoot(ClassReflection $facade)
Determine whether the facade forwards static calls it doesn't declare to its root. Hash's and Crypt's __callStatic() forward as Facade's does, keeping the arguments out of stack traces; another can forward the call anywhere.
at line 169
array
getCalledMethods(MethodCall|StaticCall $call, string $name, Scope $scope)
Get the method the call runs on each class it may be made on.
A static call on a facade runs the facade's own method or its root's.