Closed tremby closed 9 years ago
This would be a BC break, and remove flexibility. Processors are currently any callable. If Monolog was requiring PHP 5.4+, the method adding them would have a callable
typehint.
Ah, so all I need to do is run is_callable()
on it, and if that's true, which it is if the __invoke
method is declared, it can count as a processor. So everything I want to do is already possible. Thanks for clarifying.
It would be useful to have an interface which Processor classes implement. They are mostly loose classes with no inheritance right now, so determining that a given object is a Processor is impossible.