Login   Register  
PHP Classes
elePHPant
Icontem

Gettable: Make protected class properties accessible

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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 (2 years ago) RSS 2.0 feedNot enough user ratingsTotal: 296 All time: 6,566 This week: 1,478Up
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
Name: Chris Lam <contact>
Classes: 3 packages by
Country: Hong Kong Hong Kong
Age: 27
All time rank: 16409 in Hong Kong Hong Kong
Week rank: 1735 Down10 in Hong Kong Hong Kong Down
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:296All time:6,566
 This week:0This week:1,478Up
 User Comments (1)