Login   Register  
PHP Classes
elePHPant
Icontem

Property: Add read-only class variables dynamically

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   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2006-12-22 (7 years ago) RSS 2.0 feedNot enough user ratingsTotal: 565 All time: 4,907 This week: 1,478Up
Version License PHP version Categories  
property 1.0GNU General Public Lice...5PHP 5, Data types
Description Author  

This package can be used to add and remove variables to a class dynamically at run-time.

The variables may be made read-only. Read-only variables may not be changed or removed.

Each variable may have associated custom setter and getter functions in order to implement special purpose behavior when the variable is changed or retrieved.

Innovation Award  
PHP Programming Innovation award nominee
December 2006
Number 9
Under PHP 5, you can have classes with variables with restricted access using private and protected accessor clauses. However, these keywords do not provide read-only access to a variable.

This class implements read-only access control into class variables. It uses special getter and setter functions to overcome the original access control restrictions of PHP 5.

Manuel Lemos
Picture of Lucas Ara˙jo
Name: Lucas Ara˙jo <contact>
Classes: 2 packages by
Country: Brazil Brazil
Age: 33
All time rank: 143399 in Brazil Brazil
Week rank: 574 Up44 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Plain text file Property.php Class Property and Value classes
Accessible without login Plain text file PropertyTest.php Example Property class test

 Version Control Unique User Downloads Download Rankings  
 0%Total:565All time:4,907
 This week:0This week:1,478Up