PHP __set and __get Magic methods
Object oriented programming principles encourage encapsulation, i.e. containing all the functionality inside a class. Usually this means member variables should be private or protected, one of the common ways to do this is with various set and get methods. In the case of a user class it may have setName, getName, setAge, getAge and so on. This can be time consuming to set up, change and maintain. The magic methods __set and __get provide a quick way to implement generic set and get methods.
Visit publisher site: PHP __set and __get Magic methodsListing Details
- Filed in:
-
Scripts / PHP / Tutorials & Tips / Miscellaneous
- Submitted on:
- Last Updated:
- Aug 8, 2008
- Publisher:
- Dougal Matthews Other listings by this publisher
License & Pricing Information
LICENSE #1
- License Type:
- Other
- Price:
- $0.00 USD
- Additional Info:
User Reviews
Be the first to review this listing!Not yet reviewed by any member.... You can be the FIRST one to write a review for PHP __set and __get Magic methods