public function csl_name::__construct in Bibliography Module 7
Same name and namespace in other branches
- 6.2 modules/CiteProc/CSL.inc \csl_name::__construct()
- 7.2 modules/CiteProc/CSL.inc \csl_name::__construct()
Overrides csl_format::__construct
File
- modules/
CiteProc/ CSL.inc, line 537 - CiteProc-PHP.
Class
Code
public 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);
}