You are here

class csl_citation in Bibliography Module 7

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

Hierarchy

Expanded class hierarchy of csl_citation

File

modules/CiteProc/CSL.inc, line 1779
CiteProc-PHP.

View source
class csl_citation extends csl_format {
  private $layout = NULL;

  /**
   *
   */
  public function init($dom_node, $citeproc) {
    $options = $dom_node
      ->getElementsByTagName('option');
    foreach ($options as $option) {
      $value = $option
        ->getAttribute('value');
      $name = $option
        ->getAttribute('name');
      $this->attributes[$name] = $value;
    }
    $layouts = $dom_node
      ->getElementsByTagName('layout');
    foreach ($layouts as $layout) {
      $this->layout = new csl_layout($layout, $citeproc);
    }
  }

  /**
   *
   */
  public function render($data, $mode = NULL) {
    $this->citeproc->quash = array();
    $text = $this->layout
      ->render($data, 'citation');
    return $this
      ->format($text);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
csl_citation::$layout private property
csl_citation::init public function Overrides csl_element::init
csl_citation::render public function Overrides csl_rendering_element::render
csl_collection::$elements protected property
csl_collection::add_element public function
csl_element::$attributes protected property
csl_element::$citeproc protected property
csl_element::get_attributes public function
csl_element::get_hier_attributes public function
csl_element::name public function
csl_element::set_attributes public function
csl_element::__get public function
csl_element::__isset public function
csl_element::__set public function
csl_element::__unset public function
csl_format::$format protected property 1
csl_format::$no_op protected property
csl_format::format public function Overrides csl_collection::format 1
csl_format::init_formatting public function 5
csl_format::__construct public function Overrides csl_element::__construct 2