Methods

Read a config from a file.

fromFile(string $filename, bool $returnConfigObject) : array | \Zend\Config\Config

Parameters

$filename

string

$returnConfigObject

bool

Exceptions

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

Returns

Read configuration from multiple files and merge them.

fromFiles(array $files, bool $returnConfigObject) : array | \Zend\Config\Config

Parameters

$files

array

$returnConfigObject

bool

Returns

Get the reader plugin manager

getReaderPluginManager() : \Zend\Config\ReaderPluginManager

Get the writer plugin manager

getWriterPluginManager() : \Zend\Config\WriterPluginManager

Set config reader for file extension

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

Parameters

$extension

string

Exceptions

\Zend\Config\Exception\InvalidArgumentException

Set config writer for file extension

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

Parameters

$extension

string

Exceptions

\Zend\Config\Exception\InvalidArgumentException

Set reader plugin manager

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

Parameters

Set writer plugin manager

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

Parameters

Writes a config to a file

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

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

 

Plugin manager for loading writers

$writers : null | \Zend\Config\WriterPluginManager

 

Registered config file extensions.

$extensions : array

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