AppBoot
    
            
            in package
            
        
    
            
            implements
                            AppInterface                    
    
    
        
        
    
Interfaces, Classes, Traits and Enums
Table of Contents
- _REQUIRED_CONSTANT = true
 - $builder : ConstantBuilder
 - $configs : Configs
 - $isMultitenant : bool|null
 - $logger : LoggerInterface
 - $app : App
 - $appDirPath : string
 - $environment : string|null
 - $httpFactory : HostManager
 - $ipResolver : ClientIpResolver
 - $request : ServerRequestInterface
 - $tenantResolver : Tenant
 - __construct() : mixed
 - AppFactory constructor.
 - init() : App
 - Creates and configures the application instance.
 - isTestMode() : bool
 - Check if the application is running in test mode.
 - run() : void
 - Runs the created application.
 - isMultitenantApp() : bool
 - Determines if the application is configured to operate in multi-tenant mode.
 - copyConfigSampleFile() : void
 - Copies <configs>/<file>.php ➜ <configs>/<file>.sample.php – Does nothing if the user‑specific file already exists.
 - createPrivateDir() : void
 - Create private directory if it doesn't exist.
 - createRequest() : ServerRequestInterface
 - Create server request instance.
 - defineEarlyConstants() : void
 - defineInitialConstants() : void
 - Define initial constants required by the application.
 - defineMandatoryConstants() : null|ConstantBuilder
 - Define mandatory application constants.
 - getEnvironmentFiles() : array<string|int, mixed>
 - Get environment files for the application.
 - getTenant() : mixed
 - Get tenant information from the request.
 - loadDotEnv() : void
 - Load dot environment files.
 - loadEarlyConfiguration() : void
 - loadZeroConfig() : void
 - Load zero configuration file if it exists.
 - setAppDirectoryPath() : string
 - Sets the application directory path by locating the Composer autoloader.
 - setEnvironment() : void
 - Set the environment type for the application.
 - setErrorHandler() : void
 - Set up error handler for the application.
 - setupContainer() : Bindings
 - Set up the dependency injection container.
 - setupEnvironment() : void
 - Set up the application environment.
 
Constants
_REQUIRED_CONSTANT
    private
        bool
    _REQUIRED_CONSTANT
    = true
    
    
    
Properties
$builder
    protected
        ConstantBuilder
    $builder
    
    
    
    
$configs
    protected
        Configs
    $configs
    
    
    
    
$isMultitenant
    protected
        bool|null
    $isMultitenant
    
    
    
    
$logger
    protected
        LoggerInterface
    $logger
    
    
    
    
$app
    private
        App
    $app
    
    
    
    
$appDirPath
    private
        string
    $appDirPath
    
    
    
    
$environment
    private
        string|null
    $environment
    
    
    
    
$httpFactory
    private
        HostManager
    $httpFactory
    
    
    
    
$ipResolver
    private
        ClientIpResolver
    $ipResolver
    
    
    
    
$request
    private
        ServerRequestInterface
    $request
    
    
    
    
$tenantResolver
    private
        Tenant
    $tenantResolver
    
    
    
    
Methods
__construct()
AppFactory constructor.
    public
                    __construct(string $appDirPath[, null|string $environment = null ][, null|ServerRequestInterface $request = null ][, null|ClientIpResolver $ipResolver = null ][, null|Tenant $tenantResolver = null ][, null|HostManager $httpFactory = null ][, null|ConstantBuilder $builder = null ]) : mixed
    
        Parameters
- $appDirPath : string
 - 
                    
The directory path for the application
 - $environment : null|string = null
 - 
                    
The environment setting
 - $request : null|ServerRequestInterface = null
 - 
                    
Optional server request
 - $ipResolver : null|ClientIpResolver = null
 - 
                    
Optional IP resolver
 - $tenantResolver : null|Tenant = null
 - 
                    
Optional tenant resolver
 - $httpFactory : null|HostManager = null
 - 
                    
Optional HTTP factory
 - $builder : null|ConstantBuilder = null
 - 
                    
Optional ConstantBuilder
 
Return values
mixed —init()
Creates and configures the application instance.
    public
                    init() : App
    
    
    
        Return values
App —An initialized App instance.
isTestMode()
Check if the application is running in test mode.
    public
            static        isTestMode() : bool
    
    
    
        Return values
bool —True if running in test mode, false otherwise
run()
Runs the created application.
    public
                    run() : void
    
    
    
    Tags
Return values
void —isMultitenantApp()
Determines if the application is configured to operate in multi-tenant mode.
    protected
            static        isMultitenantApp(mixed $composerConfig) : bool
    
        Parameters
- $composerConfig : mixed
 
Return values
bool —Returns true if the application is in multi-tenant mode, otherwise false.
copyConfigSampleFile()
Copies <configs>/<file>.php ➜ <configs>/<file>.sample.php – Does nothing if the user‑specific file already exists.
    private
                    copyConfigSampleFile(string $file, Container $c) : void
    
        Parameters
- $file : string
 - 
                    
Basename without extension (e.g. 'constants', 'app')
 - $c : Container
 - 
                    
PSR‑11 container with
filesystem+configs 
Return values
void —createPrivateDir()
Create private directory if it doesn't exist.
    private
                    createPrivateDir(Container $psrContainer) : void
    
        Parameters
- $psrContainer : Container
 - 
                    
PSR-11 container
 
Return values
void —createRequest()
Create server request instance.
    private
                    createRequest([null|ServerRequestInterface $request = null ]) : ServerRequestInterface
    
        Parameters
- $request : null|ServerRequestInterface = null
 - 
                    
Optional server request
 
Return values
ServerRequestInterface —Server request instance
defineEarlyConstants()
    private
                    defineEarlyConstants(string $appDirPath) : void
        
        Parameters
- $appDirPath : string
 
Return values
void —defineInitialConstants()
Define initial constants required by the application.
    private
                    defineInitialConstants(null|TenantInfo $tenantInfo) : void
    
        Parameters
- $tenantInfo : null|TenantInfo
 - 
                    
Tenant information
 
Return values
void —defineMandatoryConstants()
Define mandatory application constants.
    private
                    defineMandatoryConstants(string $httpHost, string $peerIp) : null|ConstantBuilder
    
        Parameters
- $httpHost : string
 - 
                    
HTTP host
 - $peerIp : string
 - 
                    
Peer IP address
 
Return values
null|ConstantBuilder —Constant builder instance or null if in test mode
getEnvironmentFiles()
Get environment files for the application.
    private
                    getEnvironmentFiles(EnvType $envType) : array<string|int, mixed>
    
        Parameters
- $envType : EnvType
 - 
                    
Environment type instance
 
Return values
array<string|int, mixed> —List of environment files
getTenant()
Get tenant information from the request.
    private
                    getTenant(ServerRequestInterface $request) : mixed
    
        Parameters
- $request : ServerRequestInterface
 - 
                    
Server request
 
Return values
mixed —Tenant information
loadDotEnv()
Load dot environment files.
    private
                    loadDotEnv(array<string|int, mixed> $envFiles, EnvType $envType) : void
    
        Parameters
- $envFiles : array<string|int, mixed>
 - 
                    
Environment files
 - $envType : EnvType
 - 
                    
Environment type instance
 
Return values
void —loadEarlyConfiguration()
    private
                    loadEarlyConfiguration() : void
        
    
    
        Return values
void —loadZeroConfig()
Load zero configuration file if it exists.
    private
                    loadZeroConfig() : void
    
    
    
        Return values
void —setAppDirectoryPath()
Sets the application directory path by locating the Composer autoloader.
    private
            static        setAppDirectoryPath(string $appDirPath) : string
    
        Parameters
- $appDirPath : string
 - 
                    
The initial application directory path
 
Tags
Return values
string —The resolved application directory path
setEnvironment()
Set the environment type for the application.
    private
                    setEnvironment() : void
        This function sets the environment type by defining the RAYDIUM_ENVIRONMENT_TYPE constant.
If the environment type is not provided, it defaults to null and can fallback to .env file setup.
Usage:
- If 
$environmentis provided, it will define theRAYDIUM_ENVIRONMENT_TYPE. - If 
$environmentisnull, the function will allow the.envfile to define the environment type. 
Return values
void —setErrorHandler()
Set up error handler for the application.
    private
                    setErrorHandler() : void
    
    
    
        Return values
void —setupContainer()
Set up the dependency injection container.
    private
                    setupContainer() : Bindings
    
    
    
        Return values
Bindings —Container bindings instance
setupEnvironment()
Set up the application environment.
    private
                    setupEnvironment(array<string|int, mixed> $envFiles, EnvType $envType, Container $psrContainer) : void
    
        Parameters
- $envFiles : array<string|int, mixed>
 - 
                    
Environment files
 - $envType : EnvType
 - 
                    
Environment type instance
 - $psrContainer : Container
 - 
                    
PSR-11 container