function &instance() {
static $instance = array();
if (empty($instance)) {
- $instance[0] =& new MANAGER();
+ $instance[0] = new MANAGER();
}
return $instance[0];
}
// load class if needed
$this->_loadClass('BLOG','BLOG.php');
// load blog object
- $blog =& new BLOG($blogid);
+ $blog = new BLOG($blogid);
$this->blogs[$blogid] =& $blog;
}
return $blog;
// load class if needed
$this->_loadClass('KARMA','KARMA.php');
// create KARMA object
- $karma =& new KARMA($itemid);
+ $karma = new KARMA($itemid);
$this->karma[$itemid] =& $karma;
}
return $karma;
}
// add to plugin array
- eval('$this->plugins[$name] =& new ' . $name . '();');
+ eval('$this->plugins[$name] = new ' . $name . '();');
// get plugid
$this->plugins[$name]->plugid = $this->getPidFromName($name);
* Can contain any type of data, depending on the event type. Usually this is
* an itemid, blogid, ... but it can also be an array containing multiple values
*/
- function notify($eventName, $data) {
+ function notify($eventName, &$data) {
// load subscription list if needed
if (!is_array($this->subscriptions))
$this->_loadSubscriptions();
$this->_loadPlugin($listener);
// do notify (if method exists)
if (isset($this->plugins[$listener]) && method_exists($this->plugins[$listener], 'event_' . $eventName))
- call_user_func(array(&$this->plugins[$listener],'event_' . $eventName), &$data);
+ call_user_func(array($this->plugins[$listener], 'event_' . $eventName), $data);
}
}