Example #1
0
 public function testConstructorWithParameterBag()
 {
     $data = $this->getSampleData();
     $bag = $this->getSampleBag();
     $bag2 = new ParameterBag($bag);
     $this->assertEquals($data, $bag2->toArray());
 }
Example #2
0
 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());
 }
Example #3
0
 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');
 }