PHP Class Kraken\Config\Config

Inheritance: implements Kraken\Config\ConfigInterface
Show file Open project: kraken-php/framework Class Usage Examples

Protected Properties

Property Type Description
$config array
$overwriteHandler callable

Public Methods

Method Description
__construct ( array $config = [], callable $handler = null )
__destruct ( )
exists ( $key )
get ( $key = '', $default = null )
getAll ( )
getConfiguration ( )
getOverwriteHandler ( )
merge ( $config, $handler = null )
remove ( $key )
set ( $key, $value )
setConfiguration ( $config )
setOverwriteHandler ( callable $handler = null )

Protected Methods

Method Description
getDefaultHandler ( ) : callable
overwrite ( array $current, array $new, callable | null $handler = null ) : array Overwrites current config using known method.

Method Details

__construct() public method

public __construct ( array $config = [], callable $handler = null )
$config array
$handler callable

__destruct() public method

public __destruct ( )

exists() public method

public exists ( $key )

get() public method

public get ( $key = '', $default = null )

getAll() public method

public getAll ( )

getConfiguration() public method

public getConfiguration ( )

getDefaultHandler() protected method

protected getDefaultHandler ( ) : callable
return callable

getOverwriteHandler() public method

public getOverwriteHandler ( )

merge() public method

public merge ( $config, $handler = null )

overwrite() protected method

Overwrites current config using known method.
protected overwrite ( array $current, array $new, callable | null $handler = null ) : array
$current array
$new array
$handler callable | null
return array

remove() public method

public remove ( $key )

set() public method

public set ( $key, $value )

setConfiguration() public method

public setConfiguration ( $config )

setOverwriteHandler() public method

public setOverwriteHandler ( callable $handler = null )
$handler callable

Property Details

$config protected property

protected array $config
return array

$overwriteHandler protected property

protected callable $overwriteHandler
return callable