value syntax, in which case * properties will automatically be created, or you can just pass a list of * Component and Property object. * * @param string $name * @param array $children * @return Component */ public function createComponent($name, array $children = array()) { $component = Component::create($name); foreach($children as $k=>$v) { if ($v instanceof Node) { $component->add($v); } else { $component->add($k, $v); } } return $component; } /** * Factory method for creating new properties * * This method automatically searches for the correct property class, based * on its name. * * You can specify the parameters either in key=>value syntax, in which case * parameters will automatically be created, or you can just pass a list of * Parameter objects. * * @param string $name * @param mixed $value * @param array $parameters * @return Property */ public function createProperty($name, $value = null, array $parameters = array()) { return Property::create($name, $value, $parameters); } }