Skip to content

Repository files navigation

Wubinworks App Bootstrap

(*)Note this package is a component(hard dependency) of Wubinworks App(currently Wubinworks Console App only) and utilizes the PHP-DI's container.

As this package name suggests, its main feature is to create the PHP-DI's container(PSR-11) and launch the AppInterface.

Requirements

Usage

\Wubinworks\AppBootstrap\AppInterface

All App types, such as HTTP, WebAPI, CLI, should implement this interface.

\Wubinworks\AppBootstrap\Container\ContainerInstanceHelper

A helper to get the \DI\Container instance statically.

You should stick with injecting \Psr\Container\ContainerInterface or \DI\Container. Use this class only if you cannot inject them or for debugging/testing purpose.

Injectable dependencies

\Wubinworks\AppBootstrap\App\Bootstrap

For creating PHP-DI's container. The PHP-DI's container can only be created once, so actually, this dependency is useless.

\Wubinworks\AppBootstrap\App\Bootstrap\ExtensionManager

For getting extensions by status. Status can be string enabled disabled or all.

Extensions are sorted by sortOrder in descending order. The smaller sortOrder, the higher priority, which means extension with smaller sortOrder can override extension with bigger sortOrder.

\Wubinworks\AppBootstrap\App\Bootstrap\State

For getting App state.

  • Check whether developer mode is enabled
  • Check whether container compilation is enabled

\Wubinworks\AppBootstrap\App\Config\Env

For getting the merged user environment configuration.

Read/merge environment configuration in this order:

  • <Project Root>/env-shared.php
  • <Project Root>/env.php

♥

If you like this package or this package helped you, please share and give a ★☆star☆★, it's NOT hard!

About

Wubinworks App Bootstrap. This package is a component of Wubinworks App and utilizes the PHP-DI's container.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages