\Omega\Support\Facade\Facades Database

Class Database.

The Database class serves as a facade for accessing the view component within the application. By extending the AbstractFacade, it provides a static interface for interacting with the underlying view functionality registered in the application container.

This class implements the getFacadeAccessor method, which returns the key used to resolve the underlying view instance. This allows for a clean and straightforward way to access view-related features without needing to instantiate the underlying components directly.

Summary

Methods
Properties
Constants
getFacadeAccessor
__callStatic
No public properties found
No public constants found
resolveFacadeInstance
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Methods

getFacadeAccessor()

getFacadeAccessor() : string

Get the facade accessor.

This method must be implemented by subclasses to return the key used to resolve the underlying instance from the application container.

Returns

string —

Return the key used to access the underlying instance.

__callStatic()

__callStatic(string  $method, array  $arguments) : mixed

Handle dynamic static calls to the facade.

This magic method intercepts static method calls on the facade and delegates the call to the underlying instance retrieved from the application container. If the instance is not set, it throws a RuntimeException.

Parameters

string $method

Holds the name of the method being called.

array $arguments

Holds the arguments passed to the method.

Throws

\Omega\Support\Facade\Exception\FacadeObjectNotSetException

If a facade root has not been set.

Returns

mixed —

Return the result of the method call on the underlying instance.

resolveFacadeInstance()

resolveFacadeInstance() : mixed

Resolve the facade instance.

This method retrieves the underlying instance for the facade from the application container. It calls the resolve method on the application instance, using the value returned by getFacadeAccessor.

Returns

mixed —

Return the resolved instance of the underlying class.