function csl_name::__construct in Bibliography Module 7.2
Same name and namespace in other branches
- 6.2 modules/CiteProc/CSL.inc \csl_name::__construct()
- 7 modules/CiteProc/CSL.inc \csl_name::__construct()
Overrides csl_format::__construct
File
- modules/
CiteProc/ CSL.inc, line 392
Class
Code
function __construct($dom_node, $citeproc = NULL) {
$tags = $dom_node
->getElementsByTagName('name-part');
if ($tags) {
foreach ($tags as $tag) {
$name_part = $tag
->getAttribute('name');
$tag
->removeAttribute('name');
for ($i = 0; $i < $tag->attributes->length; $i++) {
$value = $tag->attributes
->item($i)->value;
$name = str_replace(' ', '_', $tag->attributes
->item($i)->name);
$this->name_parts[$name_part][$name] = $value;
}
}
}
parent::__construct($dom_node, $citeproc);
}