Tag Archives

Archive of posts published in the tag: oop

Accessing private or protected attributes and methods in PHP

You might need at some point to access the pivate or protected method of a PHP class. Of course, this is in general a bad sign because methods are not available in the public interface of the class for a reason: their implementation can…

PHP – extending classes – reverse inheritance

This one is quite interesting and one reason for which I don’t like PHP that much. From http://php.net/manual/en/language.oop5.visibility.php: Members declared protected can be accessed only within the class itself and by inherited and parent classes. So members declared in a class can be accessed…