You are here

public static function csl_factory::create in Bibliography Module 7.2

Same name and namespace in other branches
  1. 6.2 modules/CiteProc/CSL.inc \csl_factory::create()
  2. 7 modules/CiteProc/CSL.inc \csl_factory::create()
4 calls to csl_factory::create()
csl_date::init in modules/CiteProc/CSL.inc
csl_element::init in modules/CiteProc/CSL.inc
csl_macros::__construct in modules/CiteProc/CSL.inc
csl_names::init in modules/CiteProc/CSL.inc

File

modules/CiteProc/CSL.inc, line 117

Class

csl_factory

Code

public static function create($dom_node, $citeproc = NULL) {
  $class_name = 'csl_' . str_replace('-', '_', $dom_node->nodeName);
  if (class_exists($class_name)) {
    return new $class_name($dom_node, $citeproc);
  }
  else {
    return NULL;
  }
}