You are here

class csl_info in Bibliography Module 6.2

Same name and namespace in other branches
  1. 7 modules/CiteProc/CSL.inc \csl_info
  2. 7.2 modules/CiteProc/CSL.inc \csl_info

Hierarchy

Expanded class hierarchy of csl_info

File

modules/CiteProc/CSL.inc, line 359

View source
class csl_info {
  public $title;
  public $id;
  public $authors = array();
  public $links = array();
  function __construct($dom_node) {
    $name = array();
    foreach ($dom_node->childNodes as $node) {
      if ($node->nodeType == 1) {
        switch ($node->nodeName) {
          case 'author':
          case 'contributor':
            foreach ($node->childNodes as $authnode) {
              if ($node->nodeType == 1) {
                $name[$authnode->nodeName] = $authnode->nodeValue;
              }
            }
            $this->authors[] = $name;
            break;
          case 'link':
            foreach ($node->attributes as $attribute) {
              $this->links[] = $attribute->value;
            }
            break;
          default:
            $this->{$node->nodeName} = $node->nodeValue;
        }
      }
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
csl_info::$authors public property
csl_info::$id public property
csl_info::$links public property
csl_info::$title public property
csl_info::__construct function