The Settings Component
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
src
tests
.gitattributes
.gitignore
.scrutinizer.yml
.travis.yml
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

Settings

Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight

The Settings Component.

Example

<?php

use miBadger\Settings\Settings;

/**
 * Construct a settings object.
 */
$settings = new Settings();

/**
 * Load the settings file from the given location.
 */
$settings->load($path);

/**
 * Returns the value to which the specified key is mapped, or null if the settings map contains no mapping for the key.
 */
$settings->get('name'); // John Doe

/**
 * Associates the specified value with the specified key in the settings map.
 */
$settings->set('Jane Doe');

/**
 * Save the settings file at the given location.
 */
$settings->save($path);