Application
Interfaces, Classes, Traits and Enums
- ConfigsInterface
- EnvSwitcherInterface
- Interface for managing different environment settings.
- ExitInterface
- HostInterface
- App
- AppFactory
- Bindings
- ServiceContainer
- EnvLoader
- EnvType
- AbstractError
- ErrorHandler
- TextHandler
- ConstantAlreadyDefinedException
- Exception thrown when attempting to define() a constant that has already been defined.
- HttpException
- Class HttpException.
- ServiceContainerException
- ServiceNotFoundException
- TenantNotFoundException
- ExitHandler
- Asset
- HostManager
- HttpClient
- HttpFactory
- Foundation
- HtmlResponse
- JsonResponse
- Request
- RequestFactory
- Response
- ServerRequest
- Stream
- UploadedFile
- Uri
- FileLogger
- Log
- AbstractMiddleware
- AdminerMiddleware
- AuthMiddleware
- ConstMiddleware
- CoreMiddleware
- FinalHandler
- MiddlewareDispatcher
- MiddlewareRegistry
- IgnitionMiddleware
- KernelMiddleware
- KioskMiddleware
- LoggingMiddleware
- SecurityHeadersMiddleware
- ShortInitMiddleware
- SpamDetectionMiddleware
- StatusMiddleware
- TenantIdMiddleware
- WhoopsMiddleware
- SapiEmitter
- Configs
- DB
- DBFactory
- Device
- HashValidator
- KernelConfig
- PanelHandler
- AuthManager
- AuthValidator
- Domain
- IDGenerator
- Router
- TenantRepository
- TenantResolver
- TinyQuery
- A minimal PSR-friendly class that: Boots a short-init version of WordPress, Offers a minimal DB query method (`query`), Provides a simple router mechanism via FastRoute, Lets you define routes and dispatch them,
- SiteManager
- Str
- Switcher
- Class EnvSwitch.
- Terminate
- ErrorTrait
- WhitelistTrait
Table of Contents
- ABSPATH = __DIR__ . '/'
- ADMINER_ALLOW_AUTOLOGIN = true
- APP_DIR_PATH = $appDirPath
- APP_HTTP_HOST = $httpHost
- APP_TENANT_ID = $this->tenant['uuid']
- APP_TENANT_ID = \null
- DISABLE_AND_BLOCK_WPSERVER_UPDATES = \false
- HYBRIDX = \false
- IS_MULTITENANT = true
- LANDLORD_UUID = $this->configs->config['composer']->get('extra.multitenant.uuid', null)
- RAYDIUM_ENVIRONMENT_TYPE = $environment
- SITE_CONFIGS_DIR = 'configs'
- SRC_CONFIGS_DIR = SRC_PATH_DIR . '/inc/configs'
- SRC_PATH_DIR = \dirname(__DIR__)
- USE_STRICT_ENV_VARS = \false
- USE_TWIGIT = false
- WP_DEBUG = \false
- For developers: WordPress debugging mode.
- WP_USE_THEMES = \true
- WPINC = 'wp-includes'
- asset() : string
- The Asset url.
- assetUrl() : string
- The Asset url only.
- env() : mixed
- Retrieves a sanitized, and optionally encrypted or modified, environment variable by name.
- appOptionsDir() : string|null
- configs() : mixed
- Retrieves configuration data using dot notation.
- cleanSensitiveEnv() : void
- Cleans up sensitive environment variables.
- localConfigsDir() : string
- isMultitenantApp() : bool
- Determines if the application is configured to operate in multi-tenant mode.
- getWpframeworkHttpEnv() : string|null
- setMultitenantUploadDirectory() : array<string|int, mixed|string>
- Sets the upload directory to a tenant-specific location.
- frameworkFooterLabel() : string
- Custom admin footer text.
- frameworkCurrentThemeInfo() : array<string|int, bool|string>
- exitWithThemeError() : void
- logMessage() : void
- Logs a message with the specified level and an optional log file.
- logWithStackTrace() : void
- customHeaderMiddleware() : void
- toMillisecond() : mixed
- twigit() : null|Twigit
- Retrieves the Twig configuration file path.
- twig() : Twigit
- Initializes and returns a Twig environment instance.
Constants
ABSPATH
public
mixed
ABSPATH
= __DIR__ . '/'
ADMINER_ALLOW_AUTOLOGIN
public
mixed
ADMINER_ALLOW_AUTOLOGIN
= true
APP_DIR_PATH
public
mixed
APP_DIR_PATH
= $appDirPath
APP_HTTP_HOST
public
mixed
APP_HTTP_HOST
= $httpHost
APP_TENANT_ID
public
mixed
APP_TENANT_ID
= $this->tenant['uuid']
APP_TENANT_ID
public
mixed
APP_TENANT_ID
= \null
DISABLE_AND_BLOCK_WPSERVER_UPDATES
public
mixed
DISABLE_AND_BLOCK_WPSERVER_UPDATES
= \false
HYBRIDX
public
mixed
HYBRIDX
= \false
IS_MULTITENANT
public
mixed
IS_MULTITENANT
= true
LANDLORD_UUID
public
mixed
LANDLORD_UUID
= $this->configs->config['composer']->get('extra.multitenant.uuid', null)
RAYDIUM_ENVIRONMENT_TYPE
public
mixed
RAYDIUM_ENVIRONMENT_TYPE
= $environment
SITE_CONFIGS_DIR
public
mixed
SITE_CONFIGS_DIR
= 'configs'
SRC_CONFIGS_DIR
public
mixed
SRC_CONFIGS_DIR
= SRC_PATH_DIR . '/inc/configs'
SRC_PATH_DIR
public
mixed
SRC_PATH_DIR
= \dirname(__DIR__)
USE_STRICT_ENV_VARS
public
mixed
USE_STRICT_ENV_VARS
= \false
USE_TWIGIT
public
mixed
USE_TWIGIT
= false
WP_DEBUG
For developers: WordPress debugging mode.
public
mixed
WP_DEBUG
= \false
Change this to true to enable the display of notices during development. It is strongly recommended that plugin and theme developers use WP_DEBUG in their development environments.
For information on other constants that can be used for debugging, visit the documentation.
Tags
WP_USE_THEMES
public
mixed
WP_USE_THEMES
= \true
WPINC
public
mixed
WPINC
= 'wp-includes'
Functions
asset()
The Asset url.
asset(string $asset[, null|string $path = null ]) : string
Parameters
- $asset : string
-
path to the asset like: "/images/thing.png"
- $path : null|string = null
Return values
string —assetUrl()
The Asset url only.
assetUrl([null|string $path = null ]) : string
Parameters
- $path : null|string = null
Return values
string —env()
Retrieves a sanitized, and optionally encrypted or modified, environment variable by name.
env(string $name[, mixed $default = null ][, bool $encrypt = false ][, bool $strtolower = false ]) : mixed
Parameters
- $name : string
-
The name of the environment variable to retrieve.
- $default : mixed = null
-
Default value to return if the environment variable is not set.
- $encrypt : bool = false
-
Indicate if the value should be encrypted. Defaults to false.
- $strtolower : bool = false
-
Whether to convert the retrieved value to lowercase. Defaults to false.
Tags
Return values
mixed —The sanitized environment variable value, possibly encrypted or typecast, or transformed to lowercase if specified.
appOptionsDir()
appOptionsDir() : string|null
Return values
string|null —configs()
Retrieves configuration data using dot notation.
configs() : mixed
This function allows easy access to nested configuration data through dot notation syntax.
Tags
Return values
mixed —The full configuration object is returned.
cleanSensitiveEnv()
Cleans up sensitive environment variables.
cleanSensitiveEnv(array<string|int, mixed> $sensitives) : void
This function removes specified environment variables from the $_ENV superglobal and the environment to help secure sensitive information.
Parameters
- $sensitives : array<string|int, mixed>
-
An array of environment variable names to be cleaned up.
Return values
void —localConfigsDir()
localConfigsDir() : string
Return values
string —isMultitenantApp()
Determines if the application is configured to operate in multi-tenant mode.
isMultitenantApp() : bool
This is based on the presence and value of the IS_MULTITENANT
constant.
If IS_MULTITENANT
is defined and set to true
, the application is
considered to be in multi-tenant mode.
Return values
bool —Returns true
if the application is in multi-tenant mode, otherwise false
.
getWpframeworkHttpEnv()
getWpframeworkHttpEnv() : string|null
Return values
string|null —setMultitenantUploadDirectory()
Sets the upload directory to a tenant-specific location.
setMultitenantUploadDirectory(array<string|int, mixed> $dir) : array<string|int, mixed|string>
This function modifies the default WordPress upload directory paths to store tenant-specific uploads in a separate folder based on the tenant ID. It ensures that each tenant's uploads are organized and stored in an isolated directory.
Parameters
- $dir : array<string|int, mixed>
-
The array containing the current upload directory's path and URL.
Tags
Return values
array<string|int, mixed|string> —frameworkFooterLabel()
Custom admin footer text.
frameworkFooterLabel() : string
Return values
string —The formatted footer text.
frameworkCurrentThemeInfo()
frameworkCurrentThemeInfo() : array<string|int, bool|string>
Tags
Return values
array<string|int, bool|string> —exitWithThemeError()
exitWithThemeError(array<string|int, mixed> $themeInfo) : void
Parameters
- $themeInfo : array<string|int, mixed>
Return values
void —logMessage()
Logs a message with the specified level and an optional log file.
logMessage(string $message[, string $level = 'info' ][, array<string|int, mixed> $context = [] ][, null|string $logFile = null ]) : void
Parameters
- $message : string
-
The log message.
- $level : string = 'info'
-
The log level (e.g., 'info', 'error', 'debug', etc.).
- $context : array<string|int, mixed> = []
-
Optional context data for the log message.
- $logFile : null|string = null
-
Optional log file to use. If null, the default or fallback will be used.
Return values
void —logWithStackTrace()
logWithStackTrace() : void
Return values
void —customHeaderMiddleware()
customHeaderMiddleware(App $app) : void
Parameters
- $app : App
Return values
void —toMillisecond()
toMillisecond(float $seconds) : mixed
Parameters
- $seconds : float
Return values
mixed —twigit()
Retrieves the Twig configuration file path.
twigit() : null|Twigit
This function allows users to define their own Twig configuration file. If a custom configuration file exists at the specified path, it will be used. Otherwise, the default framework Twig configuration file is returned.
Return values
null|Twigit —The file path to the Twig configuration file.
twig()
Initializes and returns a Twig environment instance.
twig([array<string|int, mixed> $options = [] ][, array<string|int, mixed> $templates = [] ]) : Twigit
This function configures the Twig environment using the specified templates directory path and optional environment settings.
Twig environment options can be passed as an associative array to customize the behavior of the environment. Refer to the Twig documentation for a full list of available options.
Parameters
- $options : array<string|int, mixed> = []
- $templates : array<string|int, mixed> = []
Tags
Return values
Twigit —The initialized Twig environment instance.