public function testConstructorWithParameterBag() { $data = $this->getSampleData(); $bag = $this->getSampleBag(); $bag2 = new ParameterBag($bag); $this->assertEquals($data, $bag2->toArray()); }
public function __construct($options = array()) { $options = new ParameterBag($options); $this->template = $options->get('template', $this->getDefaultTemplate()); $this->templateFolder = $options->get('templateFolder', $this->getDefaultTemplateFolder()); $this->twig = new \Twig_Environment(new \Twig_Loader_Filesystem($this->templateFolder)); $this->templateOptions = $options->get('templateOptions', array()); }
public function __construct(array $options = array()) { $bag = new ParameterBag($options); $this->delimiter = $bag->get('delimiter', ','); $this->enclosure = $bag->get('enclosure', '"'); $this->locale = $bag->get('locale', ''); $this->charset = $bag->get('charset', 'utf-8'); }