for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of tenside/core.
*
* (c) Christian Schiffler <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* This project is provided in good faith and hope to be usable by anyone.
* @package tenside/core
* @author Christian Schiffler <[email protected]>
* @copyright 2015 Christian Schiffler <[email protected]>
* @license https://github.com/tenside/core/blob/master/LICENSE MIT
* @link https://github.com/tenside/core
* @filesource
*/
namespace Tenside\Core\Config;
use Tenside\Core\Util\JsonFile;
* JSON based config.
class SourceJson implements SourceInterface
{
* The JsonFile.
* @var JsonFile
protected $jsonFile;
* Create a new instance.
* @param string $filename The filename.
public function __construct($filename)
$this->jsonFile = new JsonFile($filename);
}
* {@inheritDoc}
public function get($path, $forceArray = false)
return $this->jsonFile->get($path, $forceArray);
public function has($path)
return $this->jsonFile->has($path);
public function set($path, $value)
$this->jsonFile->set($path, $value);
return $this;