PHP Class Devise\Support\Config\SettingsManager

Afficher le fichier Open project: devisephp/cms Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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

merge() public méthode

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

prettyVarExport() protected méthode

..
protected prettyVarExport ( array $content ) : string
$content array
Résultat string

remove() public méthode

..
public remove ( array $settings ) : void
$settings array
Résultat void

update() public méthode

.. 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
Résultat void

varExport() protected méthode

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