for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Galileo\SettingBundle\Lib\Application;
use Galileo\SettingBundle\Lib\Model\SectionBagInterface;
use Galileo\SettingBundle\Lib\Model\SectionQuery;
use Galileo\SettingBundle\Lib\Model\SettingRepositoryInterface;
use Galileo\SettingBundle\Lib\Model\ValueObject\Section;
class SettingApplication implements SectionBagInterface
{
private $settingRepository;
public function __construct(SettingRepositoryInterface $settingRepository)
$this->settingRepository = $settingRepository;
}
/**
* {@inheritdoc}
*/
public function get($settingKey, $defaultValue = null)
$sectionQuery = new SectionQuery($this->settingRepository, Section::blank());
return $sectionQuery->get($settingKey, $defaultValue);
public function section($name)
return new SectionQuery($this->settingRepository, new Section($name));
public function set($keyName, $valueString)
$sectionQuery->set($keyName, $valueString);