Hi, I have another problem migrating to php5.
An important piece of my "web kernel" is a system of include / require throw exceptions :
Instead of : require $x
I do : trigger_error ('INC_'.$x...)
Error_handler :
...
$this = $errcontext ["this"] ; //Error!!!!!
include $x ;
...
It allows me to decide some things, to find dinamically files, to log for debug, ... I liked very much this solution and changing that it's a lot of work.
You can require a file in the code of a class method, and the inserted code fits there transparently. So, how can I emulate this when I've changed the scope temporaly, I'm in a third function.
I have to pass the instance reference from a class method to another scope (function -> error_handler -> included file) keeping the $this reference transparently.
Any ideas?
Thanks
An important piece of my "web kernel" is a system of include / require throw exceptions :
Instead of : require $x
I do : trigger_error ('INC_'.$x...)
Error_handler :
...
$this = $errcontext ["this"] ; //Error!!!!!
include $x ;
...
It allows me to decide some things, to find dinamically files, to log for debug, ... I liked very much this solution and changing that it's a lot of work.
You can require a file in the code of a class method, and the inserted code fits there transparently. So, how can I emulate this when I've changed the scope temporaly, I'm in a third function.
I have to pass the instance reference from a class method to another scope (function -> error_handler -> included file) keeping the $this reference transparently.
Any ideas?
Thanks
Comment