![]() |
FRED™
3.0
FRED™: Framework for Rapid and Easy Development
|
Basic object. More...
Public Member Functions | |
| propertyExists ($property) | |
| Check if a property exists (public or published). More... | |
| constants ($prefix=null) | |
| Return all constants. More... | |
| get ($key) | |
| Get one or more properties. More... | |
| set ($key, $value=null) | |
| Set one or more properties. More... | |
| __get ($key) | |
| __set ($key, $value) | |
Data Fields | |
| const | HIDDEN = 0 |
| Property is hidden. More... | |
| const | READABLE = 1 |
| Property is readable. More... | |
| const | WRITEABLE = 2 |
| Property is writeable. More... | |
| const | READWRITE = 3 |
| Property is readable and writeable. More... | |
Protected Member Functions | |
| publish ($property, $visibility=self::READABLE) | |
| Publish a property (or hide it again). More... | |
| configure ($config) | |
| Configure the object. More... | |
| _get ($key) | |
| Default getter if no specific setter is defined, and the property is also not published (readable). More... | |
| _set ($key, $value) | |
| Default setter if no specific setter is defined, and the property is also not published (writeable). More... | |
Protected Attributes | |
| $_published = [] | |
| Published properties (key = name of property, value = visibility). More... | |
Basic object.
By making use of the magic getter and setter it is not necessary to define a specific getter and setter for every property upfront. All properties can be used as normal properties (that is: without using getXxx() and setXxx() functions). A property which first was public can be made private/protected, after which it is possible to use a specific getter and/or setter. Private properties can also be published, which makes it unnecessary to create a specic getter and/or setter.
|
protected |
|
protected |
|
protected |
| constants | ( | $prefix = null | ) |
| get | ( | $key | ) |
| propertyExists | ( | $property | ) |
|
protected |
| set | ( | $key, | |
$value = null |
|||
| ) |
|
protected |