 |
|
Innovation award
 Nominee: 1x |
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.
|
|
| Name: |
Access Methods |
| Base name: |
accessmethods |
| Description: |
Map variable accesses to accessor method calls |
| Version: |
- |
| PHP version: |
- |
| License: |
BSD License |
| All time users: |
1090 users |
| All time rank: |
2993 |
| Week users: |
0 users |
| Week rank: |
2045  |
| |
|
 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 |
| There are not enough user ratings to display for this class. |
| |
Applications that use this class |
|
|
No application links were specified for this class.

If you know an application of this package, send a message to the
author to add a link here.
| |
Files |
|
|