API Documentation
Namespaces
Table of Contents
- ABSPATH = __DIR__ . '/'
- ABSPATH = __DIR__ . '/'
- ADMINER_ALLOW_AUTOLOGIN = false
- APP_DIR_PATH = $appDirPath
- APP_HTTP_HOST = null
- APP_MODE = \null
- APP_TENANT_ID = \null
- APP_TENANT_ID = $this->tenant['uuid']
- AUTH_COOKIE = 'wpx_auth_' . COOKIEHASH
- AUTH_KEY = 'put your unique phrase here'
- AUTH_SALT = 'put your unique phrase here'
- AUTOMATIC_UPDATER_DISABLED = \false
- COMPRESS_CSS = \true
- COMPRESS_SCRIPTS = \true
- COOKIEHASH = md5(env('HOME_URL'))
- DB_CHARSET = 'utf8mb4'
- DB_CHARSET = env('DB_CHARSET', 'utf8mb4')
- DB_COLLATE = ''
- DB_COLLATE = env('DB_COLLATE', '')
- DB_HOST = 'localhost'
- DB_HOST = env('DB_HOST', 'localhost')
- DB_NAME = 'your_database_name'
- DB_NAME = env('DB_NAME')
- DB_PASSWORD = 'your_password'
- DB_PASSWORD = env('DB_PASSWORD')
- DB_USER = 'your_username'
- DB_USER = env('DB_USER')
- DISABLE_WP_ORG_UPDATES = \false
- DISALLOW_FILE_EDIT = \true
- DISALLOW_INDEXING = \true
- DISALLOW_UNFILTERED_HTML = \true
- EMPTY_TRASH_DAYS = 30
- ENFORCE_GZIP = \true
- FORCE_SSL_ADMIN = \true
- FS_CHMOD_DIR = 0755
- FS_CHMOD_FILE = 0644
- HASH_TENANT_ID = $composer_config->get('extra.multitenant.hash', false)
- HYBRIDX = \false
- ISOLATED_TENANT = true
- LANDLORD_UUID = $this->configs->config['composer']->get('extra.multitenant.uuid', null)
- LOGGED_IN_COOKIE = 'wpx_logged_in_' . COOKIEHASH
- LOGGED_IN_KEY = 'put your unique phrase here'
- LOGGED_IN_SALT = 'put your unique phrase here'
- NONCE_KEY = 'put your unique phrase here'
- NONCE_SALT = 'put your unique phrase here'
- PASS_COOKIE = 'wpx_pass_' . COOKIEHASH
- PRIVATE_DIR_PATH = APP_DIR_PATH . '/private'
- RECOVERY_MODE_COOKIE = 'wpx_rec_' . COOKIEHASH
- SAVEQUERIES = \true
- SCRIPT_DEBUG = \true
- SECURE_AUTH_COOKIE = 'wpx_sec_' . COOKIEHASH
- SECURE_AUTH_KEY = 'put your unique phrase here'
- SECURE_AUTH_SALT = 'put your unique phrase here'
- SHORTINIT = true
- SRC_CONFIGS_DIR = SRC_PATH_DIR . '/inc/configs'
- SRC_PATH_DIR = \dirname(__DIR__)
- TENANT_CONFIGS_PATH = $this->configs->getConfigsDir() . TENANT_CONFIG_DIR . '/' . $this->tenant['uuid']
- TEST_COOKIE = md5('wpx_test_cookie' . env('HOME_URL'))
- USE_STRICT_ENV_VARS = \false
- USER_COOKIE = 'wpx_user_' . COOKIEHASH
- WP_AUTO_UPDATE_CORE = \true
- WP_CACHE = \true
- WP_DEBUG = \false
- WP_DEBUG_DISPLAY = \false
- WP_DEBUG_LOG = \false
- WP_DISABLE_FATAL_ERROR_HANDLER = \false
- WP_MEMORY_LIMIT = '512M'
- WP_POST_REVISIONS = 5
- WP_USE_THEMES = \true
- WPINC = 'wp-includes'
- asset() : string
- The Asset url.
- assetUrl() : string
- The Asset url only.
- env() : mixed
- Retrieve an environment variable with optional sanitization, encryption, and normalization.
- 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.
- pluginAccessManager() : PluginControl
- 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
- toMillisecond() : mixed
- twigit() : null|Twigit
- Retrieves the Twig configuration file path.
- twig() : Twigit
- Initializes and returns a Twig environment instance.
- isRaydiumDisabled() : bool
- Check if Raydium is disabled.
- getAppThemeDir() : string|null
- custom_error_handler() : mixed
Constants
ABSPATH
public
mixed
ABSPATH
= __DIR__ . '/'
ABSPATH
public
mixed
ABSPATH
= __DIR__ . '/'
ADMINER_ALLOW_AUTOLOGIN
public
mixed
ADMINER_ALLOW_AUTOLOGIN
= false
APP_DIR_PATH
public
mixed
APP_DIR_PATH
= $appDirPath
APP_HTTP_HOST
public
mixed
APP_HTTP_HOST
= null
APP_MODE
public
mixed
APP_MODE
= \null
APP_TENANT_ID
public
mixed
APP_TENANT_ID
= \null
APP_TENANT_ID
public
mixed
APP_TENANT_ID
= $this->tenant['uuid']
AUTH_COOKIE
public
mixed
AUTH_COOKIE
= 'wpx_auth_' . COOKIEHASH
AUTH_KEY
public
mixed
AUTH_KEY
= 'put your unique phrase here'
AUTH_SALT
public
mixed
AUTH_SALT
= 'put your unique phrase here'
AUTOMATIC_UPDATER_DISABLED
public
mixed
AUTOMATIC_UPDATER_DISABLED
= \false
COMPRESS_CSS
public
mixed
COMPRESS_CSS
= \true
COMPRESS_SCRIPTS
public
mixed
COMPRESS_SCRIPTS
= \true
COOKIEHASH
public
mixed
COOKIEHASH
= md5(env('HOME_URL'))
DB_CHARSET
public
mixed
DB_CHARSET
= 'utf8mb4'
DB_CHARSET
public
mixed
DB_CHARSET
= env('DB_CHARSET', 'utf8mb4')
DB_COLLATE
public
mixed
DB_COLLATE
= ''
DB_COLLATE
public
mixed
DB_COLLATE
= env('DB_COLLATE', '')
DB_HOST
public
mixed
DB_HOST
= 'localhost'
DB_HOST
public
mixed
DB_HOST
= env('DB_HOST', 'localhost')
DB_NAME
public
mixed
DB_NAME
= 'your_database_name'
DB_NAME
public
mixed
DB_NAME
= env('DB_NAME')
DB_PASSWORD
public
mixed
DB_PASSWORD
= 'your_password'
DB_PASSWORD
public
mixed
DB_PASSWORD
= env('DB_PASSWORD')
DB_USER
public
mixed
DB_USER
= 'your_username'
DB_USER
public
mixed
DB_USER
= env('DB_USER')
DISABLE_WP_ORG_UPDATES
public
mixed
DISABLE_WP_ORG_UPDATES
= \false
DISALLOW_FILE_EDIT
public
mixed
DISALLOW_FILE_EDIT
= \true
DISALLOW_INDEXING
public
mixed
DISALLOW_INDEXING
= \true
DISALLOW_UNFILTERED_HTML
public
mixed
DISALLOW_UNFILTERED_HTML
= \true
EMPTY_TRASH_DAYS
public
mixed
EMPTY_TRASH_DAYS
= 30
ENFORCE_GZIP
public
mixed
ENFORCE_GZIP
= \true
FORCE_SSL_ADMIN
public
mixed
FORCE_SSL_ADMIN
= \true
FS_CHMOD_DIR
public
mixed
FS_CHMOD_DIR
= 0755
FS_CHMOD_FILE
public
mixed
FS_CHMOD_FILE
= 0644
HASH_TENANT_ID
public
mixed
HASH_TENANT_ID
= $composer_config->get('extra.multitenant.hash', false)
HYBRIDX
public
mixed
HYBRIDX
= \false
ISOLATED_TENANT
public
mixed
ISOLATED_TENANT
= true
LANDLORD_UUID
public
mixed
LANDLORD_UUID
= $this->configs->config['composer']->get('extra.multitenant.uuid', null)
LOGGED_IN_COOKIE
public
mixed
LOGGED_IN_COOKIE
= 'wpx_logged_in_' . COOKIEHASH
LOGGED_IN_KEY
public
mixed
LOGGED_IN_KEY
= 'put your unique phrase here'
LOGGED_IN_SALT
public
mixed
LOGGED_IN_SALT
= 'put your unique phrase here'
NONCE_KEY
public
mixed
NONCE_KEY
= 'put your unique phrase here'
NONCE_SALT
public
mixed
NONCE_SALT
= 'put your unique phrase here'
PASS_COOKIE
public
mixed
PASS_COOKIE
= 'wpx_pass_' . COOKIEHASH
PRIVATE_DIR_PATH
public
mixed
PRIVATE_DIR_PATH
= APP_DIR_PATH . '/private'
RECOVERY_MODE_COOKIE
public
mixed
RECOVERY_MODE_COOKIE
= 'wpx_rec_' . COOKIEHASH
SAVEQUERIES
public
mixed
SAVEQUERIES
= \true
SCRIPT_DEBUG
public
mixed
SCRIPT_DEBUG
= \true
SECURE_AUTH_COOKIE
public
mixed
SECURE_AUTH_COOKIE
= 'wpx_sec_' . COOKIEHASH
SECURE_AUTH_KEY
public
mixed
SECURE_AUTH_KEY
= 'put your unique phrase here'
SECURE_AUTH_SALT
public
mixed
SECURE_AUTH_SALT
= 'put your unique phrase here'
SHORTINIT
public
mixed
SHORTINIT
= true
SRC_CONFIGS_DIR
public
mixed
SRC_CONFIGS_DIR
= SRC_PATH_DIR . '/inc/configs'
SRC_PATH_DIR
public
mixed
SRC_PATH_DIR
= \dirname(__DIR__)
TENANT_CONFIGS_PATH
public
mixed
TENANT_CONFIGS_PATH
= $this->configs->getConfigsDir() . TENANT_CONFIG_DIR . '/' . $this->tenant['uuid']
TEST_COOKIE
public
mixed
TEST_COOKIE
= md5('wpx_test_cookie' . env('HOME_URL'))
USE_STRICT_ENV_VARS
public
mixed
USE_STRICT_ENV_VARS
= \false
USER_COOKIE
public
mixed
USER_COOKIE
= 'wpx_user_' . COOKIEHASH
WP_AUTO_UPDATE_CORE
public
mixed
WP_AUTO_UPDATE_CORE
= \true
WP_CACHE
public
mixed
WP_CACHE
= \true
WP_DEBUG
public
mixed
WP_DEBUG
= \false
WP_DEBUG_DISPLAY
public
mixed
WP_DEBUG_DISPLAY
= \false
WP_DEBUG_LOG
public
mixed
WP_DEBUG_LOG
= \false
WP_DISABLE_FATAL_ERROR_HANDLER
public
mixed
WP_DISABLE_FATAL_ERROR_HANDLER
= \false
WP_MEMORY_LIMIT
public
mixed
WP_MEMORY_LIMIT
= '512M'
WP_POST_REVISIONS
public
mixed
WP_POST_REVISIONS
= 5
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()
Retrieve an environment variable with optional sanitization, encryption, and normalization.
env(string $name[, mixed $default = null ][, bool $encrypt = false ][, bool $strtolower = false ][, bool $sysOverride = true ][, bool $syncGlobals = true ]) : mixed
This helper unifies three possible sources of environment values:
-
System environment variables (real OS/Docker/server envs via
getenv()
). -
$_ENV array (often populated by frameworks via
.env
files). - Fallback default (if neither source has a value).
Precedence rules depend on $sysOverride
:
-
When
$sysOverride = true
(default): System env values always override $_ENV/.env values if present. Order of resolution: getenv() > $_ENV > $default -
When
$sysOverride = false
: $_ENV/.env values take priority over system envs. Order of resolution: $_ENV > getenv() > $default
After resolving the raw value, it is passed to the Env instance for whitelist enforcement, optional encryption, normalization, and strtolower().
Notes:
- An empty string
""
is treated as a set value (no fallback). - If
$syncGlobals
is true, the resolved value is written back to both$_ENV
andgetenv()
to keep globals consistent. Disable this in tests or when side effects are undesirable. - Type coercion (e.g. "true" → bool, "123" → int) is handled by the Env class.
Parameters
- $name : string
-
The name of the environment variable to retrieve.
- $default : mixed = null
-
Value returned if not set in either getenv() or $_ENV.
- $encrypt : bool = false
-
Whether to encrypt the retrieved value (default false).
- $strtolower : bool = false
-
Whether to force lowercase output (default false).
- $sysOverride : bool = true
-
Whether system getenv() should override $_ENV values. Default true (12-factor style: system > .env).
- $syncGlobals : bool = true
-
Whether to sync resolved values back to global env via putenv(). Default true.
Tags
Return values
mixed —The resolved, sanitized environment variable value, or $default if not found.
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> —pluginAccessManager()
pluginAccessManager() : PluginControl
Return values
PluginControl —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 —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.
isRaydiumDisabled()
Check if Raydium is disabled.
isRaydiumDisabled() : bool
Return values
bool —Returns true if Raydium is disabled, false otherwise
getAppThemeDir()
getAppThemeDir() : string|null
Return values
string|null —custom_error_handler()
custom_error_handler(mixed $errno, mixed $errstr, mixed $errfile, mixed $errline) : mixed
Parameters
- $errno : mixed
- $errstr : mixed
- $errfile : mixed
- $errline : mixed