Skip to content
Advertisement

Tag: magic-methods

PHP – __call all the time

Say we have a class with several protected and/or public methods. I need to perform a check each time a method is called. I could do that check each time i call a method : or But i would like developers neither to have to think about it nor to write it. I’ve thought about using __call to do :

Advertisement