mini\Mini
final
class
Documentation
Core framework singleton that manages application configuration and service container.
This class is instantiated once when Composer's autoloader loads vendor/fubber/mini/bootstrap.php. It provides:
- Application configuration (root, locale, timezone, debug mode)
- PSR-11 service container with Singleton, Scoped, and Transient lifetimes
- Path registries for multi-location file resolution (config, routes, views)
- Lifecycle phase management (Initializing → Bootstrap → Ready → Shutdown)
Configuration is read from environment variables (MINI_* prefixed) or .env file in project root. All configuration happens during instantiation - the Mini instance is immutable after construction.
Inheritance
Implements:
Psr\Container\ContainerInterface
Properties (15)
Global singleton instance of Mini framework.
string $root
Application root directory path.
Path registries for multi-location file resolution.
string $docRoot
Web-accessible document root directory path.
string $baseUrl
Base URL for the application.
string $cdnUrl
CDN base URL for static assets.
string $locale
Default locale for internationalization.
string $timezone
Default timezone for date/time operations.
string $sqlTimezone
Database timezone for datetime storage (offset format, e.g., '+00:00').
string $defaultLanguage
Default language code for translations.
bool $debug
Debug mode flag.
string $salt
Application-wide cryptographic salt.
WeakMap $instanceCache
Caches instances using a scope object; each request will
Application lifecycle state machine
array $services
Service definitions (factory closures + lifetime)
Methods (13)
Documentation missing
An object that uniquely identifies the current request scope.
Load a configuration file using the path registry system.
Load service configuration by class name using path registry.
Returns an object that will survive for the duration of the current
Register a service with the container
Set a service instance directly, bypassing factory creation.
Check if a service is registered in the container
Get a service from the container
Create a closure that invokes a callable or constructs a class with dependency injection.
Resolve parameters for dependency injection.
Detect the project root directory.
Documentation missing