Oliverde8's blue Website

Playing with trait's to make autoconstructs in PHP

I have recently for the first time in a while being playing with a bit of Java. One of the library on the project was lombok. What this library allows is to generate getters & setters during compilations thanks to annotations. This is very often done in php with the magic methods (http://php.net/manual/en/language.oop5.magic.php). What lombok also allows is to create constructors automatically, again with a simple annoation. This is great and is something I have never seen in PHP. Why is it practical to have constructors genetated automatically ? When extending an existing cla ...

Read more