Beispiel #1
0
 public function defineParameter($key, $type, $label, $default = null)
 {
     if (isset($this->parameter[$key])) {
         throw new \InvalidArgumentException('Parameter already define in bag: ' . $key);
     }
     $parameter = new Parameter();
     $parameter->setKey($key);
     $parameter->setType($type);
     $parameter->setLabel($label);
     $parameter->setDefault($default);
     $this->parameter[$key] = $parameter;
 }