$advlink =AdvLink::getInstance(); * * @return JCE The editor object * * @since 1.5 */ public static function getInstance($type, $config = array()) { if (!isset(self::$instances)) { self::$instances = array(); } if (empty(self::$instances[$type])) { $file = WF_EDITOR . '/extensions/search/' . $type . '.php'; if (is_file($file)) { require_once WF_EDITOR . '/extensions/search/' . $type . '.php'; } $classname = 'WF' . ucfirst($type) . 'SearchExtension'; if (class_exists($classname)) { self::$instances[$type] = new $classname($config); } else { self::$instances[$type] = new self(); } } return self::$instances[$type]; } }