Application
class Application (View source)
The core WP Emerge component representing an application.
Traits
Methods
Make a new application instance.
Constructor.
Get whether the application has been bootstrapped.
Bootstrap the application.
Catch any configuration exceptions and short-circuit to an error page.
Details
in HasAliasesTrait at line 36
boolean
hasAlias(string $alias)
Get whether an alias is registered.
in HasAliasesTrait at line 46
array|null
getAlias(string $alias)
Get a registered alias.
in HasAliasesTrait at line 62
void
setAlias(array $alias)
Register an alias.
Useful when passed the return value of getAlias() to restore a previously registered alias, for example.
in HasAliasesTrait at line 82
void
alias(string $alias, string|Closure $target, string $method = '')
Register an alias.
Identical to setAlias but with a more user-friendly interface.
in HasAliasesTrait at line 97
mixed
__call(string $method, array $parameters)
Call alias if registered.
in HasContainerTrait at line 52
mixed|null
resolve(string $key)
Resolve a dependency from the IoC container.
in HasContainerTrait at line 31
Container
container()
Get the IoC container instance.
in HasContainerTrait at line 42
void
setContainer(Container $container)
Set the IoC container instance.
at line 46
static Application
make()
Make a new application instance.
at line 56
__construct(Container $container, boolean $render_config_exceptions = true)
Constructor.
at line 67
boolean
isBootstrapped()
Get whether the application has been bootstrapped.
at line 78
void
bootstrap(array $config = [], boolean $run = true)
Bootstrap the application.