Current location - Training Enrollment Network - Books and materials - How can the private members of the class in Gao Luofeng PHP video (library management) access from the outside?
How can the private members of the class in Gao Luofeng PHP video (library management) access from the outside?
Accessors should be used internally. Note whether there is a set accessor (or proxy) in the Page class. ) I don't remember the official noun, anyway, it is _ _ get (); _ _ set(); These two methods can return and set private fields.

These two methods are rarely used, but they are better when setting read-only or write-only properties (which rarely happens)