PHP Classes
Icontem

Class: Access Methods


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Olavo Alexandrino  >  Access Methods  >  Download  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Access Methods Support forum
Base name: accessmethods
Description: Map variable accesses to accessor method calls
Version: -
Required PHP version: -
License: BSD License
All time users: 796 users
All time rank: 2744
Week users: 5 users
Week rank: 1571
 
  Author   Group folder image Groups   Detailed description  
  Rate classes User ratings   Applications   Related links   Files Files  

Author

Picture of Olavo Alexandrino
Name: Olavo Alexandrino <e-mail contact>
Published packages: 8 Browse this author's classes Browse this author's classes
Country: Brazil Brazil - PHP jobs in Brazil
Home page: http://oalexandrino.com/
Age: 28
All time rank: 68
Week rank: 148

Innovation Award

PHP Programming Innovation award nominee
July 2006
Number 7
Some authors prefer to encapsulate the access to the properties of objects of a class using setter and getter functions and making the property variables private.

This approach allows allows changing the implementation of the access to the properties without changing the interface of the class.

Despite the advantages of this approach, many users prefer the variable assignment syntax to set or get the property values, as it is less tedious.

This class makes possible to use the variable assignment syntax to access the properties while keeping the setter and getter approach.

It takes advantage of the PHP 5 special class functions __set and __get functions and the reflection API to determine which functions should be called set or get property values.

Manuel Lemos

Groups

Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Language Constructs to assist in the language control View top rated classes

Detailed description

This class can be used to map accesses to class variables into calls to setter and getter methods.

It provides functions that can called from a class __set and __get methods to automatically set or get the property values by calling the class setter and getter methods for the respective properties.

For example, if there is a property named "name", the class accessor methods usually are named of "getName" and "setName". Accesses to $object->name property are mapped to $object->setName($value) and $object->getName() calls.

User ratings

There are not enough user ratings to display for this class.

Applications that use this class

No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.

Related links

Link Description
The AccessMethods class Documentation This link has a little documentation of class
oalexandrino's classes This link contains a summary of my classes

Files

File Role Description
Plain text file test.php Example An example of use
Plain text file class.AccessMethods.php Class The AccessMethods class
Download all files: accessmethods.tar.gz accessmethods.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products