Raydium Framework

AppFactory
in package

Table of Contents

$app  : AppInit
create()  : AppInit
run()  : void
createRequest()  : ServerRequestInterface
setEnvironment()  : void
Set the environment type for the application.
setErrorHandler()  : void

Properties

Methods

create()

public static create(string $appDirPath[, string|null $environment = null ]) : AppInit
Parameters
$appDirPath : string
$environment : string|null = null
Return values
AppInit

run()

public static run() : void
Return values
void

setEnvironment()

Set the environment type for the application.

private static setEnvironment([null|string $environment = null ]) : 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 $environment is provided, it will define the RAYDIUM_ENVIRONMENT_TYPE.
  • If $environment is null, the function will allow the .env file to define the environment type.
Parameters
$environment : null|string = null

The environment type, which can be a string (e.g., 'production', 'development') or null to use the .env file setup.

Return values
void

setErrorHandler()

private static setErrorHandler() : void
Return values
void

Search results