You're already in an if/else, you might as well just call `$this->_objects[$class]->$function($params);` here and `$HOOK->$function($params)` in the else.