Constants

CONFIG_NAMESPACE

CONFIG_NAMESPACE = 'core'

Properties

$properties

$properties : array

Array of properties.

Type

array

Methods

setConfig()

setConfig(mixed  $key, mixed  $value = null) : bool

Parameters

mixed $key
mixed $value

Returns

bool —

TRUE when an existing value was overridden, otherwise FALSE

getConfig()

getConfig(mixed  $key = null, mixed  $default = null) : mixed

Parameters

mixed $key
mixed $default

Returns

mixed —

the value for $key or $default if $key cannot be found in the given $namespace

hasConfig()

hasConfig(mixed  $key) : bool

Parameters

mixed $key

Returns

bool —

TRUE if the key is set, otherwise FALSE

removeConfig()

removeConfig(mixed  $key) : bool

Parameters

mixed $key

Returns

bool —

TRUE if the value was found and removed, otherwise FALSE

setProperty()

setProperty(string  $key, mixed  $value) : bool

Sets a property. Changes will not be persisted accross http request boundaries.

Parameters

string $key

Key of the property

mixed $value

Value for the property

Throws

\InvalidArgumentException

on invalid parameters

Returns

bool —

TRUE when an existing value was overridden, otherwise FALSE

getProperty()

getProperty(string  $key, mixed  $default = null) : mixed

Returns a property.

Parameters

string $key

Key of the property

mixed $default

Default value, will be returned if the property isn't set

Throws

\InvalidArgumentException

on invalid parameters

Returns

mixed —

The value for $key or $default if $key cannot be found

hasProperty()

hasProperty(string  $key) : bool

Returns if a property is set.

Parameters

string $key

Key of the property

Returns

bool —

TRUE if the key is set, otherwise FALSE

removeProperty()

removeProperty(string  $key) : bool

Removes a property.

Parameters

string $key

Key of the property

Throws

\InvalidArgumentException

on invalid parameters

Returns

bool —

TRUE if the value was found and removed, otherwise FALSE

isSetup()

isSetup() : bool

Returns if the setup is active.

Returns

bool —

isBackend()

isBackend() : bool

Returns if the environment is the backend.

Returns

bool —

isFrontend()

isFrontend() : bool

Returns if the environment is the frontend.

Returns

bool —

getEnvironment()

getEnvironment() : string

Returns the environment.

Returns

string —

isDebugMode()

isDebugMode() : bool

Returns if the debug mode is active.

Returns

bool —

getDebugFlags()

getDebugFlags() : array

Returns the debug flags.

Returns

array —

isSafeMode()

isSafeMode() : bool

Returns if the safe mode is active.

Returns

bool —

getTablePrefix()

getTablePrefix() : string

Returns the table prefix.

Returns

string —

getTable()

getTable(string  $table) : string

Adds the table prefix to the table name.

Parameters

string $table

Table name

Returns

string —

getTempPrefix()

getTempPrefix() : string

Returns the temp prefix.

Returns

string —

getUser()

getUser() : null|\rex_user

Returns the current user.

Returns

null|\rex_user —

requireUser()

requireUser() : \rex_user

Returns the current user.

In contrast to getUser, this method throw a rex_exception if the user does not exist.

Returns

\rex_user —

getImpersonator()

getImpersonator() : null|\rex_user

Returns the current impersonator user.

Returns

null|\rex_user —

getConsole()

getConsole() : null|\rex_console_application

Returns the console application.

Returns

null|\rex_console_application —

getRequest()

getRequest() : \Symfony\Component\HttpFoundation\Request

Returns

\Symfony\Component\HttpFoundation\Request —

getDbConfig()

getDbConfig(int  $db = 1) : \rex_config_db

Parameters

int $db

Throws

\rex_exception

Returns

\rex_config_db —

getServer()

getServer(null|string  $protocol = null) : string

Returns the server URL.

Parameters

null|string $protocol

Returns

string —

getServerName()

getServerName() : string

Returns the server name.

Returns

string —

getErrorEmail()

getErrorEmail() : string

Returns the error email.

Returns

string —

getVersion()

getVersion(string  $format = null) : string

Returns the redaxo version.

Parameters

string $format

See {@link}

Returns

string —

getVersionHash()

getVersionHash(mixed  $path, ?string  $repo = null) : mixed

Parameters

mixed $path
?string $repo

Returns

mixed —

getPackageConfig()

getPackageConfig() : array

Returns

array —

getPackageOrder()

getPackageOrder() : \list<string>

Returns

\list

getAccesskey()

getAccesskey(string  $title, string  $key) : string

Returns the title tag and if the property "use_accesskeys" is true, the accesskey tag.

Parameters

string $title

Title

string $key

Key for the accesskey

Returns

string —

getFilePerm()

getFilePerm() : int

Returns the file perm.

Returns

int —

getDirPerm()

getDirPerm() : int

Returns the dir perm.

Returns

int —