package Default

 Methods

Read a config from a file.

fromFile(string $filename, boolean $returnConfigObject = false, boolean $useIncludePath = false) : array | \Zend\Config\Config
Static

Parameters

$filename

string

$returnConfigObject

boolean

$useIncludePath

boolean

Exceptions

\Zend\Config\Exception\InvalidArgumentException
\Zend\Config\Exception\RuntimeException

Returns

array\Zend\Config\Config

Read configuration from multiple files and merge them.

fromFiles(array $files, boolean $returnConfigObject = false, boolean $useIncludePath = false) : array | \Zend\Config\Config
Static

Parameters

$files

array

$returnConfigObject

boolean

$useIncludePath

boolean

Returns

array\Zend\Config\Config

Get the reader plugin manager

getReaderPluginManager() : \Zend\Config\ReaderPluginManager
Static

Returns

\Zend\Config\ReaderPluginManager

Get the writer plugin manager

getWriterPluginManager() : \Zend\Config\WriterPluginManager
Static

Returns

\Zend\Config\WriterPluginManager

Set config reader for file extension

registerReader(string $extension, string|\Zend\Config\Reader\ReaderInterface $reader) : void
Static

Parameters

$extension

string

$reader

string\Zend\Config\Reader\ReaderInterface

Exceptions

\Zend\Config\Exception\InvalidArgumentException

Set config writer for file extension

registerWriter(string $extension, string|\Zend\Config\Writer\AbstractWriter $writer) : void
Static

Parameters

$extension

string

$writer

string\Zend\Config\Writer\AbstractWriter

Exceptions

\Zend\Config\Exception\InvalidArgumentException

Set reader plugin manager

setReaderPluginManager(\Zend\Config\ReaderPluginManager $readers) : void
Static

Parameters

$readers

\Zend\Config\ReaderPluginManager

Set writer plugin manager

setWriterPluginManager(\Zend\Config\WriterPluginManager $writers) : void
Static

Parameters

$writers

\Zend\Config\WriterPluginManager

Writes a config to a file

toFile(string $filename, array|\Zend\Config\Config $config) : boolean
Static

Parameters

$filename

string

$config

array\Zend\Config\Config

Exceptions

\Zend\Config\Exception\RuntimeException
\Zend\Config\Exception\InvalidArgumentException

Returns

booleanTRUE on success | FALSE on failure

 Properties

 

Plugin manager for loading readers

$readers : null | \Zend\Config\ReaderPluginManager

Default

null
Static
 

Plugin manager for loading writers

$writers : null | \Zend\Config\WriterPluginManager

Default

null
Static
 

Registered config file extensions.

$extensions : array

Default

array('ini' => 'ini', 'json' => 'json', 'xml' => 'xml', 'yaml' => 'yaml', 'properties' => 'javaproperties')
Static

key is extension, value is reader instance or plugin name

 

Register config file extensions for writing key is extension, value is writer instance or plugin name

$writerExtensions : array

Default

array('php' => 'php', 'ini' => 'ini', 'json' => 'json', 'xml' => 'xml', 'yaml' => 'yaml')
Static