PHP Classes
elePHPant
Icontem

Gettable: Make protected class properties accessible

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2011-10-27 (4 years ago) RSS 2.0 feedNot enough user ratingsTotal: 300 All time: 6,950 This week: 920Up
Version License PHP version Categories
gettable 1.0BSD License5.1PHP 5, Data types
Description Author

This class can be used to make protected class properties accessible from outside.

It is an abstract class that provides access to retrieve values of protected properties while still preventing to change their values.

Protected properties with names that start with an underscore still cannot be accessed from outside of the class even i

Innovation Award
PHP Programming Innovation award nominee
February 2010
Number 6
Private and protected variables may not be accessed from code that is outside the object class.

Sometimes it is necessary that external code has read-only access to private and protected variables. This class provides a way to achieve that.

Manuel Lemos
Picture of Chris Lam
  Performance   Level  
Name: Chris Lam <contact>
Classes: 3 packages by
Country: Hong Kong Hong Kong
Age: 29
All time rank: 16949 in Hong Kong Hong Kong
Week rank: 1356 Up7 in Hong Kong Hong Kong Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file Gettable.cls.php Class Gettable class
Accessible without login Plain text file test.php Example test drive

 Version Control Unique User Downloads Download Rankings  
 0%
Total:300
This week:0
All time:6,950
This week:920Up
User Comments (1)