Namespaces

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • Config
  • ConfigAdapterIni

Interfaces

  • IConfigAdapter
  • Overview
  • Namespace
  • Class
  • Tree
  • Other releases

Class Config

Configuration storage.

ArrayObject implements IteratorAggregate, Traversable, ArrayAccess, Serializable, Countable
Extended by Nette\Collections\Collection implements Nette\Collections\ICollection
Extended by Nette\Collections\Hashtable implements Nette\Collections\IMap
Extended by Nette\Config\Config
Namespace: Nette\Config
Author: David Grudl
Located at Config/Config.php
Methods summary
public static
# registerExtension( string $extension, string $class )

Registers adapter for given file extension.

Registers adapter for given file extension.

Parameters

$extension
string
file extension
$class
string
class name (IConfigAdapter)
public static Nette\Config\Config
# fromFile( string $file, string $section = NULL, integer $flags = Nette\Config\Config::READONLY )

Creates new configuration object from file.

Creates new configuration object from file.

Parameters

$file
string
file name
$section
string
section to load
$flags
integer
flags (readOnly, autoexpand variables)

Returns

Nette\Config\Config
public
# __construct( array $arr = NULL, string $flags = Nette\Config\Config::READONLY )

Parameters

$arr
array
to wrap
$flags
string
class/interface name or ':type'

Throws

InvalidArgumentException
public
# save( string $file, string $section = NULL )

Save configuration to file.

Save configuration to file.

Parameters

$file
string
file
$section
string
section to write
public
# expand( )

Expand all variables.

Expand all variables.

public
# import( array|Traversable $arr )

Import from array or any traversable object.

Import from array or any traversable object.

Parameters

$arr
array|Traversable

Throws

InvalidArgumentException
public array
# toArray( )

Returns an array containing all of the elements in this collection.

Returns an array containing all of the elements in this collection.

Returns

array
public
# freeze( )

Makes the object unmodifiable.

Makes the object unmodifiable.

public
# __clone( )

Creates a modifiable clone of the object.

Creates a modifiable clone of the object.

public mixed &
# __get( integer $key )

Returns item. Do not call directly.

Returns item. Do not call directly.

Parameters

$key
integer
index

Returns

mixed

Throws

MemberAccessException
if the property is not defined.
public
# __set( integer $key, object $item )

Inserts (replaces) item. Do not call directly.

Inserts (replaces) item. Do not call directly.

Parameters

$key
integer
index
$item
object

Throws

MemberAccessException
if the property is not defined or is read-only
public boolean
# __isset( string $key )

Exists item?

Exists item?

Parameters

$key
string
name

Returns

boolean
public
# __unset( string $key )

Removes the element at the specified position in this list.

Removes the element at the specified position in this list.

Parameters

$key
string
name

Throws

MemberAccessException
Methods inherited from Nette\Collections\Hashtable
add(), append(), get(), getKeys(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), search(), throwKeyNotFound()
Methods inherited from Nette\Collections\Collection
__call(), __callStatic(), beforeAdd(), clear(), contains(), exchangeArray(), getItemType(), getIterator(), getReflection(), isFrozen(), remove(), setArray(), updating()
Methods inherited from ArrayObject
asort(), count(), getArrayCopy(), getFlags(), getIteratorClass(), ksort(), natcasesort(), natsort(), serialize(), setFlags(), setIteratorClass(), uasort(), uksort(), unserialize()
Constants summary
integer READONLY 1
#

flag

flag

integer EXPAND 2
#
Constants inherited from ArrayObject
ARRAY_AS_PROPS, STD_PROP_LIST
Nette Framework 0.9.7 API documentation generated by ApiGen 2.3.0