Class Config (namespace Nette\Config)
Configuration storage.
ArrayObject | --Collection | --Hashtable | --Config
Public Method Summary | |
---|---|
Config |
|
void |
expand
()
Expand all variables.
|
void |
freeze
()
Makes the object unmodifiable.
|
static Config |
Creates new configuration object from file.
|
void |
import
(array|\Traversable $arr)
Import from array or any traversable object.
|
static void |
registerExtension
(string $extension, string $class)
Registers adapter for given file extension.
|
void |
save
(string $file, [string $section =
NULL ])
Save configuration to file.
|
array |
toArray
()
Returns an array containing all of the elements in this collection.
|
void |
__clone
()
Creates a modifiable clone of the object.
|
& mixed |
__get
(int $key)
Returns item. Do not call directly.
|
bool |
__isset
(string $key)
Exists item?
|
void |
__set
(int $key, object $item)
Inserts (replaces) item. Do not call directly.
|
void |
__unset
(string $key)
Removes the element at the specified position in this list.
|
Methods Inherited From Hashtable |
---|
add(), append(), get(), getKeys(), import(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), search(), throwKeyNotFound() |
Methods Inherited From Collection |
---|
__construct(), append(), beforeAdd(), clear(), contains(), exchangeArray(), freeze(), getClass(), getItemType(), getIterator(), import(), isFrozen(), isReadOnly(), remove(), search(), setArray(), setReadOnly(), updating(), __call(), __callStatic(), __clone(), __get(), __isset(), __set(), __unset() |
Methods Inherited From ArrayObject (Internal Class) |
---|
constructor __construct ( $array ), append ( $value ), asort ( ), count ( ), exchangeArray ( $array ), getArrayCopy ( ), getFlags ( ), getIterator ( ), getIteratorClass ( ), ksort ( ), natcasesort ( ), natsort ( ), offsetExists ( $index ), offsetGet ( $index ), offsetSet ( $index, $newval ), offsetUnset ( $index ), setFlags ( $flags ), setIteratorClass ( $iteratorClass ), uasort ( $cmp_function ), uksort ( $cmp_function ) |
Constant Summary | |||
---|---|---|---|
int | EXPAND |
2 |
line 37 flag |
int | READONLY |
1 |
line 36 flag |
Constants Inherited From ArrayObject (Internal Class) |
---|
ARRAY_AS_PROPS = 2, STD_PROP_LIST = 1 |
Method Details | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 95 __constructpublic Config __construct ([array $arr =
|
|||||||||||||||||||||
line 139 expandpublic void expand () Expand all variables.
|
|||||||||||||||||||||
line 198 freezepublic void freeze () Makes the object unmodifiable.
|
|||||||||||||||||||||
line 77 fromFilepublic static Config fromFile (string $file, [string $section = Creates new configuration object from file.
|
|||||||||||||||||||||
line 162 importpublic void import (array|\Traversable $arr) Import from array or any traversable object.
|
|||||||||||||||||||||
line 54 registerExtensionpublic static void registerExtension (string $extension, string $class) Registers adapter for given file extension.
|
|||||||||||||||||||||
line 118 savepublic void save (string $file, [string $section = Save configuration to file.
|
|||||||||||||||||||||
line 181 toArraypublic array toArray () Returns an array containing all of the elements in this collection.
|
|||||||||||||||||||||
line 214 __clonepublic void __clone () Creates a modifiable clone of the object.
|
|||||||||||||||||||||
line 237 __getpublic mixed & __get (int $key) Returns item. Do not call directly.
|
|||||||||||||||||||||
line 263 __issetpublic bool __isset (string $key) Exists item?
|
|||||||||||||||||||||
line 251 __setpublic void __set (int $key, object $item) Inserts (replaces) item. Do not call directly.
|
|||||||||||||||||||||
line 275 __unsetpublic void __unset (string $key) Removes the element at the specified position in this list.
|