While it is technically possible to add the constructor to the Interface, Interfaces should not define the constructor because that would be an ... ... <看更多>
Modernizing PHP 4 style constructors in both a forwards and backwards-compatible fashion requires two things: renaming the PHP4 style constructor to ... ... <看更多>
That way, the other methods of the class can assume they are valid. If the parameters are passed using setters, then every method needs to check ... ... <看更多>