44 if (!isset($instance)) {
46 $instance =
new $class();
62 if (!isset(self::$handlers[
$name])) {
64 $className =
'\Xoops\Core\Kernel\Model\\' . ucfirst($name);
65 @$handler =
new $className();
66 if (!is_object($handler)) {
67 trigger_error(
'Handler ' . $className .
' not found in file ' . __FILE__, E_USER_WARNING);
70 self::$handlers[
$name] = $handler;
73 $handler = clone (self::$handlers[$name]);
74 $handler->setHandler($oHandler);
75 if (!empty($args) && is_array($args) && is_a($handler,
'Xoops\Core\Kernel\XoopsModelAbstract')) {
76 $handler->setVars($args);
loadHandler(XoopsPersistableObjectHandler $oHandler, $name, $args=null)