CodeIgniter v4.7 API

Boot
in package

Bootstrap for the application

Tags
codeCoverageIgnore

Table of Contents

Methods

bootConsole()  : void
Used by command line scripts other than * `spark` * `php-cli` * `phpunit`
bootSpark()  : int
Used by `spark`
bootTest()  : void
Used by `system/Test/bootstrap.php`
bootWeb()  : int
Used by `public/index.php`
bootWorker()  : CodeIgniter
Bootstrap for FrankenPHP worker mode.
preload()  : void
Used by `preload.php`
autoloadHelpers()  : void
checkMissingExtensions()  : void
checkOptimizationsForWorker()  : void
defineEnvironment()  : void
definePathConstants()  : void
The path constants provide convenient access to the folders throughout the application. We have to set them up here, so they are available in the config files that are loaded.
initializeCodeIgniter()  : CodeIgniter
The CodeIgniter class contains the core functionality to make the application run, and does all the dirty work to get the pieces all working together.
initializeConsole()  : Console
initializeKint()  : void
loadAutoloader()  : void
The autoloader allows all the pieces to work together in the framework.
loadCommonFunctions()  : void
loadCommonFunctionsMock()  : void
loadConfigCache()  : FactoriesCache
loadConstants()  : void
loadDotEnv()  : void
Load environment settings from .env files into $_SERVER and $_ENV
loadEnvironmentBootstrap()  : void
runCodeIgniter()  : void
Now that everything is set up, it's time to actually fire up the engines and make this app do its thang.
runCommand()  : int
saveConfigCache()  : void
setExceptionHandler()  : void

Methods

bootConsole()

Used by command line scripts other than * `spark` * `php-cli` * `phpunit`

public static bootConsole(Paths $paths) : void
Parameters
$paths : Paths
Tags
used-by

system/util_bootstrap.php

bootSpark()

Used by `spark`

public static bootSpark(Paths $paths) : int
Parameters
$paths : Paths
Return values
int

Exit code.

bootTest()

Used by `system/Test/bootstrap.php`

public static bootTest(Paths $paths) : void
Parameters
$paths : Paths

bootWeb()

Used by `public/index.php`

public static bootWeb(Paths $paths) : int

Context web: Invoked by HTTP request php-cli: Invoked by CLI via php public/index.php

Parameters
$paths : Paths
Return values
int

Exit code.

bootWorker()

Bootstrap for FrankenPHP worker mode.

public static bootWorker(Paths $paths) : CodeIgniter

This method performs one-time initialization for worker mode, loading everything except the CodeIgniter instance, which should be created fresh for each request.

Parameters
$paths : Paths
Tags
used-by

public/frankenphp-worker.php

Return values
CodeIgniter

preload()

Used by `preload.php`

public static preload(Paths $paths) : void
Parameters
$paths : Paths

autoloadHelpers()

protected static autoloadHelpers() : void

checkMissingExtensions()

protected static checkMissingExtensions() : void

checkOptimizationsForWorker()

protected static checkOptimizationsForWorker() : void

defineEnvironment()

protected static defineEnvironment() : void

definePathConstants()

The path constants provide convenient access to the folders throughout the application. We have to set them up here, so they are available in the config files that are loaded.

protected static definePathConstants(Paths $paths) : void
Parameters
$paths : Paths

initializeCodeIgniter()

The CodeIgniter class contains the core functionality to make the application run, and does all the dirty work to get the pieces all working together.

protected static initializeCodeIgniter() : CodeIgniter
Return values
CodeIgniter

initializeKint()

protected static initializeKint() : void

loadAutoloader()

The autoloader allows all the pieces to work together in the framework.

protected static loadAutoloader() : void

We have to load it here, though, so that the config files can use the path constants.

loadCommonFunctions()

protected static loadCommonFunctions() : void

loadCommonFunctionsMock()

protected static loadCommonFunctionsMock() : void

loadConstants()

protected static loadConstants() : void

loadDotEnv()

Load environment settings from .env files into $_SERVER and $_ENV

protected static loadDotEnv(Paths $paths) : void
Parameters
$paths : Paths

loadEnvironmentBootstrap()

protected static loadEnvironmentBootstrap(Paths $paths[, bool $exit = true ]) : void
Parameters
$paths : Paths
$exit : bool = true

runCodeIgniter()

Now that everything is set up, it's time to actually fire up the engines and make this app do its thang.

protected static runCodeIgniter(CodeIgniter $app) : void
Parameters
$app : CodeIgniter

runCommand()

protected static runCommand(Console $console) : int
Parameters
$console : Console
Return values
int

setExceptionHandler()

protected static setExceptionHandler() : void

        
On this page

Search results