(Please direct me elsewhere if necessary, this is a feature request) It would be handy to allow a method to behave differently based on who is calling it. the function I am looking for would essentially do this:
function getCaller(){ $bt = debug_backtrace(); return $bt[2]['object']; } But of course, there is a lot of uneccessary processing with that call. Perhaps it could be implimented similar to "self" and "parent" (actualy more like "static") keywords. So you could do: public function registerMe() { if( ! (caller instanceof 'my_interface')) throw new dev_execption(); if( ! ($this->authenticateMod(caller))) throw new admin_exception('module not active'); $this->loadedMods[caller->module_id()] = caller; return caller->onLoad(); } Chris Trahey Web Applications Developer Database Administrator CSISD [Technology]