public function views_oai_pmh_xml_node::get_node in Views OAI-PMH 7.2
Same name and namespace in other branches
- 6.2 plugins/includes/views_oai_pmh_xml_node.inc \views_oai_pmh_xml_node::get_node()
Returns a reference to the specified node, which is a child of this one, by its key. Creates the node if it doesn't exist.
Parameters
string $key: The name of the XML node to retrieve.
Return value
views_oai_pmh_xml_node The requested XML node object.
File
- plugins/
includes/ views_oai_pmh_xml_node.inc, line 59 - Definition of the views_oai_pmh_xml_node class.
Class
- views_oai_pmh_xml_node
- A class designed to represent an XML node, specially designed to help the Views OAI PMH module render OAI fields as XML elements.
Code
public function get_node($key) {
if (is_array($this->value) && array_key_exists($key, $this->value)) {
return $this->value[$key];
}
return $this->value[$key] = new views_oai_pmh_xml_node($key);
}