for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace JK\Sam\Configuration;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* Abstract configuration class.
*/
abstract class Configuration implements ConfigurationInterface
{
* @var ParameterBag
protected $parameters;
* Configuration constructor.
public function __construct()
$this->parameters = new ParameterBag();
}
* Define allowed parameters and values for this configuration, using optionsResolver component.
*
* @param OptionsResolver $resolver
abstract public function configureOptions(OptionsResolver $resolver);
* Return true if the parameter exists.
* @param string $name
* @return bool
public function hasParameter($name)
return $this
->parameters
->has($name);
* Return the parameter value.
* @return mixed
public function getParameter($name)
->get($name);
* Define all resolved parameters values.
* @param array $parameters
public function setParameters(array $parameters)
$this->parameters = new ParameterBag($parameters);
* Return all parameters.
* @return array
public function getParameters()
->all();