You need to modify Testclass::someMethod to call the event handler directly

Axel Tietje wrote:

Hi,

I would like to do the following

When an objects method is called like this:

$test= new Testclass;
$test->someMethod ($someArgument);

I'd like to have an event handler outside Testclass to
log this event, like this:

function event_handler ( $method_name, $obj [, mixed parameter [, mixed...]]) {
   switch get_class($obj) {
       case "testclass" :
           // ...
           if ($method_name == "someMethod " {
               // ...
           }
       break;
   }
}

Is that possible in any way?


TIA, Axel.






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to