You are here

class csl_factory in Bibliography Module 7

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

Hierarchy

Expanded class hierarchy of csl_factory

File

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

View source
class csl_factory {

  /**
   *
   */
  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;
    }
  }

}

Members