release; } public function require_all_upgrades() { return false; } /** * * @return Array */ public function concern() { return $this->concern; } public function apply(base &$databox) { $dom = $databox->get_dom_structure(); $xpath = $databox->get_xpath_structure(); $res = $xpath->query('/record/subdefs/preview/type'); foreach ($res as $type) { if ($type->nodeValue == 'video') { $preview = $type->parentNode; $to_add = array( 'acodec' => 'faac', 'vcodec' => 'libx264', 'bitrate' => '700' ); foreach ($to_add as $k => $v) { $el = $dom->createElement($k); $el->appendChild($dom->createTextNode($v)); $preview->appendChild($el); } } } $databox->saveStructure($dom); return true; } }