Advertisement
ihris

litlfred

Jan 5th, 2011
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1.     /**
  2.      * Method to actually call the hooks
  3.      */
  4.     protected function _callHooks($hook,$arg) {
  5.         $ret = array();
  6.         $methods = $this->getHooks($hook);
  7.         I2CE::raiseError("Calling for $hook:\n" . print_r($methods,true));
  8.         foreach ($methods as $data) {
  9.             $module=$this->getClass($data['module']);
  10.             $method=$data['method'];
  11.             if ($arg === null) {
  12.                 $ret[]=$module->{$method}();
  13.             } else {
  14.                 $ret[]=$module->{$method}($arg);
  15.             }
  16.         }
  17.         return $ret;
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement