I'm playing around with some custom error handling routines, which I've wrapped in a utility class. The constructor determines if the script is executing local/live and changes the error display parameters accordingly. I've created a setter method i.e:
The first argument is the reporting level, the second is an optional log file. My problem is that if I try and pass anything other than the integer label for the error_reporting level, be it a string or a constant, it stops the error reporting working. This in itself is not a massive problem, but makes the method a bit less user friendly.
Can anyone shed any light or give me some ideas how I could make this work (regardless of the OOP applicability in this situation)?