function &create(&$root, &$pipeline) { if ($root->has_attribute('name')) { $name = $root->get_attribute('name'); } elseif ($root->has_attribute('id')) { $name = $root->get_attribute('id'); } else { $name = ""; } $box = new FormBox($name); $box->create_content($root, $pipeline); return $box; }