for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Changelog keeper
*
* @link https://github.com/hiqdev/chkipper
* @package chkipper
* @license BSD-3-Clause
* @copyright Copyright (c) 2016, HiQDev (http://hiqdev.com/)
*/
namespace hiqdev\chkipper\components;
use hiqdev\chkipper\history\ConfigInterface;
use yii\base\BootstrapInterface;
use yii\base\Component;
use yii\helpers\Json;
use Yii;
* Config class.
* Loads and holds configuration.
* @author Andrii Vasyliev <[email protected]>
class Config extends Component implements BootstrapInterface, ConfigInterface
{
protected $_name;
public $configFile = 'chkipper.json';
public $historyFile = 'history.md';
public $changelogFile = 'CHANGELOG.md';
public function bootstrap($app)
if (is_file($this->configFile)) {
$json = file_get_contents($this->configFile);
$data = Json::decode($json);
Yii::configure($this, $data);
}
public function setName($name)
$this->_name = $name;
public function getName()
return $this->_name;