Possible to intercept class instantiation in PHP?
Is there a way in PHP that, every time I instantiate a new class — e.g. $o = new SomeClass()
— I can “intercept” that and actually return some other class?
Is there a way in PHP that, every time I instantiate a new class — e.g. $o = new SomeClass()
— I can “intercept” that and actually return some other class?