getDocument(); $nodeFactory = $parser->getNodeFactory(); foreach ($options as $key => $value) { $meta = $nodeFactory->createMetaNode($key, $value); $document->addHeaderNode($meta); } if ($node === null) { return; } $document->addNode($node); } }