You are here

public static function heartbeatParser::instantiate in Heartbeat 6.3

Same name and namespace in other branches
  1. 6.4 includes/heartbeatparser.inc \heartbeatParser::instantiate()

Creates an instance of heartbeat as singleton

File

includes/heartbeatparser.inc, line 356

Class

heartbeatParser

Code

public static function instantiate($type = 'cached') {
  static $instances;
  if (!$instances) {
    $instances = array();
  }
  if (!isset($instances[$type])) {
    $instances[$type] = new HeartbeatParser();
  }
  return $instances[$type];
}