Example #1
0
 public function addOption($type, $name, $default, $label = '', $description = '', array $properties = array(), $subsequent = '')
 {
     $class = Option::getObjectClass($type);
     $option = new $class($name, $default, $properties);
     $option->label = $label;
     $option->description = $description;
     $this->addChild($option, $subsequent);
     return $option;
 }
Example #2
0
 public function setType($type, $default, array $properties = array())
 {
     $class = Option::getObjectClass($type);
     $this->type = $type;
     $this->default = $default;
     $this->properties = $properties;
     $this->prototype = new $class('__n__', $default, $properties);
     $this->prototype->parent = $this;
     $this->reset();
 }