PHP Класс Contao\Config

Custom settings above or below the ### INSTALL SCRIPT ### markers will be preserved.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$Files Files Files object
$arrCache array Cache
$arrData array Data
$blnHasLcf boolean Local file existance
$blnIsModified boolean Modification indicator
$objInstance Config Object instance (Singleton)
$strBottom string Bottom content
$strTop string Top content

Открытые методы

Метод Описание
__clone ( ) Prevent cloning of the object (Singleton)
__destruct ( ) Automatically save the local configuration
add ( string $strKey, mixed $varValue ) Add a configuration variable to the local configuration file
delete ( string $strKey ) Remove a configuration variable
get ( string $strKey ) : mixed | null Return a configuration value
getActiveModules ( ) : array Return all active modules as array
getInstance ( ) : static Return the current object instance (Singleton)
has ( string $strKey ) : boolean Check whether a configuration value exists
isComplete ( ) : boolean Return true if the installation is complete
persist ( string $strKey, mixed $varValue ) Permanently set a configuration value
preload ( ) Preload the default and local configuration
remove ( string $strKey ) Permanently remove a configuration value
save ( ) Save the local configuration file
set ( string $strKey, string $varValue ) Temporarily set a configuration value
update ( string $strKey, mixed $varValue ) Alias for Config::add()

Защищенные методы

Метод Описание
__construct ( ) Prevent direct instantiation (Singleton)
escape ( mixed $varValue ) : mixed Escape a value depending on its type
initialize ( ) Load all configuration files
loadParameters ( ) Override the database and SMTP parameters
markModified ( ) Mark the object as modified

Описание методов

__clone() закрытый публичный метод

Prevent cloning of the object (Singleton)
final public __clone ( )

__construct() защищенный метод

Prevent direct instantiation (Singleton)
protected __construct ( )

__destruct() публичный метод

Automatically save the local configuration
public __destruct ( )

add() публичный метод

Add a configuration variable to the local configuration file
public add ( string $strKey, mixed $varValue )
$strKey string The full variable name
$varValue mixed The configuration value

delete() публичный метод

Remove a configuration variable
public delete ( string $strKey )
$strKey string The full variable name

escape() защищенный метод

Escape a value depending on its type
protected escape ( mixed $varValue ) : mixed
$varValue mixed The value
Результат mixed The escaped value

get() публичный статический метод

Return a configuration value
public static get ( string $strKey ) : mixed | null
$strKey string The short key
Результат mixed | null The configuration value

getActiveModules() публичный метод

Return all active modules as array
Устаревший: Deprecated since Contao 4.0, to be removed in Contao 5.0. Use the container parameter "kernel.bundles" instead.
public getActiveModules ( ) : array
Результат array An array of active modules

getInstance() публичный статический метод

Return the current object instance (Singleton)
public static getInstance ( ) : static
Результат static The object instance

has() публичный статический метод

Check whether a configuration value exists
public static has ( string $strKey ) : boolean
$strKey string The short key
Результат boolean True if the configuration value exists

initialize() защищенный метод

Load all configuration files
protected initialize ( )

isComplete() публичный статический метод

Return true if the installation is complete
public static isComplete ( ) : boolean
Результат boolean True if the installation is complete

loadParameters() защищенный статический метод

Override the database and SMTP parameters
protected static loadParameters ( )

markModified() защищенный метод

Mark the object as modified
protected markModified ( )

persist() публичный статический метод

Permanently set a configuration value
public static persist ( string $strKey, mixed $varValue )
$strKey string The short key or full variable name
$varValue mixed The configuration value

preload() публичный статический метод

Preload the default and local configuration
public static preload ( )

remove() публичный статический метод

Permanently remove a configuration value
public static remove ( string $strKey )
$strKey string The short key or full variable name

save() публичный метод

Save the local configuration file
public save ( )

set() публичный статический метод

Temporarily set a configuration value
public static set ( string $strKey, string $varValue )
$strKey string The short key
$varValue string The configuration value

update() публичный метод

Alias for Config::add()
public update ( string $strKey, mixed $varValue )
$strKey string The full variable name
$varValue mixed The configuration value

Описание свойств

$Files защищенное свойство

Files object
protected Files,contao $Files
Результат Files

$arrCache защищенное свойство

Cache
protected array $arrCache
Результат array

$arrData защищенное свойство

Data
protected array $arrData
Результат array

$blnHasLcf защищенное статическое свойство

Local file existance
protected static bool $blnHasLcf
Результат boolean

$blnIsModified защищенное свойство

Modification indicator
protected bool $blnIsModified
Результат boolean

$objInstance защищенное статическое свойство

Object instance (Singleton)
protected static Config,contao $objInstance
Результат Config

$strBottom защищенное свойство

Bottom content
protected string $strBottom
Результат string

$strTop защищенное свойство

Top content
protected string $strTop
Результат string