for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Wandu\Config;
use Wandu\Config\Contracts\ConfigInterface;
use Wandu\Config\Exception\NotAllowedMethodException;
use Wandu\Support\DotArray;
class Config extends DotArray implements ConfigInterface
{
/** @var bool */
protected $readOnly;
/**
* @param array $items
* @param bool $readOnly
*/
public function __construct(array $items = [], $readOnly = true)
parent::__construct($items);
$this->readOnly = $readOnly;
}
* {@inheritdoc}
public function set($name, $value)
if ($this->readOnly) {
throw new NotAllowedMethodException(__FUNCTION__, __CLASS__);
return parent::set($name, $value);
public function remove($name)
return parent::remove($name);