August 2016
Intermediate to advanced
610 pages
11h 55m
English
Deceptively, the word visibility has nothing to do with application security! Instead it is simply a mechanism to control the use of your code. It can be used to steer an inexperienced developer away from the public use of methods that should only be called inside the class definition.
public, protected, or private keyword in front of any property or method definition. You can label properties as protected or private to enforce access only through public getters and setters.Base class is defined with a protected property $id. In order to access this property, the getId() and setId() public methods are defined. The protected method generateRandId() ...Read now
Unlock full access