Class rex

REX base class for core properties etc.

Package: redaxo\core
Author: gharlan
Located at redaxo/src/core/lib/rex.php

Methods summary

public static
# setConfig( mixed $key, mixed $value = null )
public static
# getConfig( mixed $key = null, mixed $default = null )
public static
# hasConfig( mixed $key )
public static
# removeConfig( mixed $key )
public static boolean
# setProperty( string $key, mixed $value )

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

public static mixed
# getProperty( string $key, mixed $default = null )

Returns a property.

public static boolean
# hasProperty( string $key )

Returns if a property is set.

public static boolean
# removeProperty( string $key )

Removes a property.

public static boolean
# isSetup( )

Returns if the setup is active.

public static boolean
# isBackend( )

Returns if the environment is the backend.

public static boolean
# isFrontend( )

Returns if the environment is the frontend.

public static string
# getEnvironment( )

Returns the environment.

public static boolean
# isDebugMode( )

Returns if the debug mode is active.

public static array
# getDebugFlags( )

Returns the debug flags.

public static boolean
# isSafeMode( )

Returns if the safe mode is active.

public static string
# getTablePrefix( )

Returns the table prefix.

public static string
# getTable( string $table )

Adds the table prefix to the table name.

public static string
# getTempPrefix( )

Returns the temp prefix.

public static null|rex_user
# getUser( )

Returns the current user.

public static null|rex_user
# getImpersonator( )

Returns the current impersonator user.

public static null|rex_console_application
# getConsole( )

Returns the console application.

public static string
# getServer( null|string $protocol = null )

Returns the server URL.

public static string
# getServerName( )

Returns the server name.

public static string
# getErrorEmail( )

Returns the error email.

public static string
# getVersion( string $format = null )

Returns the redaxo version.

public static false|string
# getVersionHash( string $path )

Returns the current git version hash for the given path.

public static string
# getAccesskey( string $title, string $key )

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

public static integer
# getFilePerm( )

Returns the file perm.

public static integer
# getDirPerm( )

Returns the dir perm.

Constants summary

string CONFIG_NAMESPACE
#'core'

Properties summary

protected static array $properties

Array of properties.

#[]