Exemple #1
0
 /**
  * @return array
  */
 private function getParameters()
 {
     if ($this->parameters === NULL) {
         $this->parameters = $this->provider->getParameters()->getArray();
     }
     return $this->parameters;
 }
Exemple #2
0
 /**
  * @param WebChemistry\Forms\Form $form
  * @param array $values
  */
 public function successForm(WebChemistry\Forms\Form $form, array $values)
 {
     foreach ($values as $name => $value) {
         $this->parameters[$name] = $value;
     }
     $this->parameters->merge();
 }
 public function testMerge()
 {
     $this->assertSame([], $this->provider->getParameters()->getChanged());
     $this->provider['float'] = '1.5';
     $this->provider['boolean'] = '3';
     $this->provider->array['one'] = 'two';
     $this->assertSame(['float', 'boolean', 'array'], $this->provider->getParameters()->getChanged());
     $this->provider->merge();
     $this->assertSame('3', $this->provider->boolean);
     $this->assertSame('two', $this->provider->array->one);
     $this->assertSame('3', $this->provider->boolean);
 }
 public function execute()
 {
     if ($this->provider) {
         $this->provider->import();
     }
 }