// Run the results through the callback, if configured.
if (!empty($this->_callbacks['list'])) {
- return call_user_func_array($this->_callbacks['list'], array($userid, $shares, $params));
+ return $this->runCallback('list', array($userid, $shares, $params));
}
return $shares;
public function addShare(Horde_Share_Object $share)
{
// Run the results through the callback, if configured.
- if (!empty($this->_callbacks['add'])) {
- call_user_func($this->_callbacks['add'], $share);
- }
-
+ $this->runCallback('add', array($share));
$result = $this->_addShare($share);
/* Store new share in the caches. */
public function removeShare(Horde_Share_Object $share)
{
// Run the results through the callback, if configured.
- if (!empty($this->_callbacks['remove'])) {
- call_user_func($this->_callbacks['remove'], $share);
- }
+ $this->runCallback('remove', array($share));
/* Remove share from the caches. */
$id = $share->getId();