| Recommend this page to a friend! |
| Author | ||
![]() |
|
Innovation award![]() Nominee: 7x Winner: 1x | |||||||||||||||||||
| Classes of Artur Graniszewski | > | C# getters and setters in PHP | > | Download .zip .tar.gz | > | > | > | |||||
|
|||||||||||||||||||||||
| Groups | Applications | Related links | ||||||||
| Groups | ||
| PHP 5 | Classes using PHP 5 specific features | View top rated classes | |
| Data types | Modeling and manipulating data types | View top rated classes | |
| Language | Constructs to assist in the language control | View top rated classes |
| Innovation Award | ||
![]() August 2011 Number 4 Prize: One copy of the Zend Studio |
Setters and getters are functions that can store and retrieve values of class variables. They encapsulate the access to variables, so applications have no direct access to the class variable values. Classes defined with setter and getter functions often store variables in private arrays or some other opaque data access method. However, this approach prevents IDE or other documentation editing tools to reverse engineer a class definition to know about its variables. This class provides a solution for this problem by letting developers define simulated variable declarations that IDE and documentation tools can extract, while preserving the encapsulation of the access to the class variable values via the getter and setter functions. Manuel Lemos |
| User ratings | ||
| There are not enough user ratings to display for this class. |
| Applications that use this class | ||
| Related links | ||
| Link | Description |
|---|---|
| Projects documentation | An article about this library |
| File | Role | Description |
|---|---|---|
| Class | Library | |
| Example | Example: marks all properties with an underscore as the first letter of their names as a read-only | |
| Doc. | Documentation |
| Download all files: csharp-getter-setter.tar.gz csharp-getter-setter.zip |