ApplicationBuilder
- Full name:
\Codefy\Framework\Configuration\ApplicationBuilder
- This class is marked as final and can't be subclassed
- This class is a Final class
Properties
app
Methods
__construct
Parameters:
Parameter | Type | Description |
---|---|---|
$app | \Codefy\Framework\Application |
withKernels
Register the kernels for the application.
withProviders
Register additional service providers.
Parameters:
Parameter | Type | Description |
---|---|---|
$providers | array | |
$withBootstrapProviders | bool |
Throws:
withSingletons
Register an array of singletons that are resource intensive or are not called often.
Parameters:
Parameter | Type | Description |
---|---|---|
$singletons | array |
withRouting
Register the routing services for the application.
public withRouting(callable|\Closure|null $using = null, array|string|null $web = null, array|null $class = null, array|string|null $api = null, string $apiPrefix = 'api', callable|null $then = null): $this
Parameters:
Parameter | Type | Description |
---|---|---|
$using | callable|\Closure|null | |
$web | array|string|null | |
$class | array|null | |
$api | array|string|null | |
$apiPrefix | string | |
$then | callable|null |
Throws:
withEncryptedEnv
Set whether environment variables should be encrypted.
Parameters:
Parameter | Type | Description |
---|---|---|
$bool | bool | Default: false. |
buildRoutingCallback
Create the routing callback for the application.
protected buildRoutingCallback(array|string|null $web = null, array|string|null $api = null, string $apiPrefix = 'api', callable|null $then = null): \Closure
Parameters:
Parameter | Type | Description |
---|---|---|
$web | array|string|null | |
$api | array|string|null | |
$apiPrefix | string | |
$then | callable|null |
registered
Register a callback to be invoked when the application's service providers are registered.
Parameters:
Parameter | Type | Description |
---|---|---|
$callback | callable |
booting
Register a callback to be invoked when the application is "booting".
Parameters:
Parameter | Type | Description |
---|---|---|
$callback | callable |
booted
Register a callback to be invoked when the application is "booted".
Parameters:
Parameter | Type | Description |
---|---|---|
$callback | callable |
return
Return the application instance.
Automatically generated on 2025-10-13