
Fabian Schmengler - 2010-10-15 16:37:41
I like the concept of a fatal error handler in the shutdown function, I implemented something similar a while ago. But your class could need some improvement, please allow me a little review:
- you set error_reporting to 1 (E_ERROR) and later on only check if it is 0. Don't forget that the error_reporting is a bitmask! To check it in a custom error handler use bitwise and. Something like
if ($errNo & error_reporting() == 0) return;
- global constants without namespace prefix could be a problem. Why not make them class constants? Or even better static members, since these are configurable values and not really constants.
- Last but not least: How is this supposed to work at all? Every method is private ;-)