PHP Classes

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    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 301 This week: 1All time: 7,404 This week: 560Up
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: 36
All time rank: 17538 in Hong Kong Hong Kong
Week rank: 416 Up1 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:301
This week:1
All time:7,404
This week:560Up
User Comments (1)