You are here

class csl_macros in Bibliography Module 7

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

Hierarchy

Expanded class hierarchy of csl_macros

File

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

View source
class csl_macros extends csl_collection {

  /**
   *
   */
  public function __construct($macro_nodes, $citeproc) {
    foreach ($macro_nodes as $macro) {
      $macro = csl_factory::create($macro, $citeproc);
      $this->elements[$macro
        ->name()] = $macro;
    }
  }

  /**
   *
   */
  public function render_macro($name, $data, $mode) {
    return $this->elements[$name]
      ->render($data, $mode);
  }

}

Members