PHP Class Devise\Support\Config\SettingsManager

显示文件 Open project: devisephp/cms Class Usage Examples

Public Methods

Method Description
__construct ( Framework $Framework, $overridesFile = null ) Create a new settings manager
merge ( array $settings ) : void Merges these settings in with the other settings from the overrides config file
remove ( array $settings ) : void Removes these overrides from the overrides config so we can go back to whatever defaults we need. Not being used as far as I know yet, but it could come in handy soon.
update ( array $settings ) : void Overrides the settings inside of the overrides file this does not merge.

Protected Methods

Method Description
prettyVarExport ( array $content ) : string Makes the variable export to the config file look pretty and human readable.
varExport ( array $content ) : string Exports the variable in an uglier version, but doesn't mess with formatting

Method Details

__construct() public method

Create a new settings manager
public __construct ( Framework $Framework, $overridesFile = null )
$Framework Devise\Support\Framework

merge() public method

Merges these settings in with the other settings from the overrides config file
public merge ( array $settings ) : void
$settings array
return void

prettyVarExport() protected method

..
protected prettyVarExport ( array $content ) : string
$content array
return string

remove() public method

..
public remove ( array $settings ) : void
$settings array
return void

update() public method

.. so if you have settings in your overrides file that aren't in the $settings array they will be lost. To keep them we need to use the merge() method instead
public update ( array $settings ) : void
$settings array
return void

varExport() protected method

Exports the variable in an uglier version, but doesn't mess with formatting
protected varExport ( array $content ) : string
$content array
return string