abstract_facade
abstract class abstract_facade implements facade_interface
| internal |
Base Facade class (Laravel-like, adapted for Moodle + Kernel container).
Acts as the internal proxy layer that resolves instances from the Kernel container. External extensions must rely on the public SDK facades instead of this base.
Properties
| static protected array<string,object> | $resolved_instances | The resolved object instances (cached roots). |
|
| static protected bool | $cached | Indicates if resolved instances should be cached. |
Methods
Dynamically handle static method calls on the facade proxy.
Get the registered service ID or class name that the facade resolves.
Get the root object behind the facade.
Swap a given instance for testing or runtime overriding.
Clear one cached facade instance.
Clear all cached facade instances.
Disable instance caching (useful for testing).
Enable instance caching.
Reset the facade: clear cache and re-enable caching.
Resolve the instance from the Kernel container.
Details
at line 62
static mixed
__callStatic(string $method, array $args)
Dynamically handle static method calls on the facade proxy.
at line 87
abstract static string
get_facade_accessor()
Get the registered service ID or class name that the facade resolves.
at line 94
static object
get_facade_root()
Get the root object behind the facade.
at line 104
static void
swap(object $instance)
Swap a given instance for testing or runtime overriding.
at line 118
static void
clear_resolved_instance(string $name)
Clear one cached facade instance.
at line 126
static void
clearresolved_instances()
Clear all cached facade instances.
at line 134
static void
disable_cache()
Disable instance caching (useful for testing).
at line 143
static void
enable_cache()
Enable instance caching.
at line 151
static void
reset()
Reset the facade: clear cache and re-enable caching.
at line 168
static protected object
resolve_facade_instance(string $name)
Resolve the instance from the Kernel container.