rfc:propertygetsetsyntax
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:propertygetsetsyntax [2010/11/29 14:32] – Added final keyword around readonly jbondc | rfc:propertygetsetsyntax [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 179: | Line 179: | ||
Note that " | Note that " | ||
- | **__Alternative Syntax__ | + | **__Alternative Syntax__** |
The syntax above attempts to match the syntax of C# properties, as well as PHP method declarations as much as possible. | The syntax above attempts to match the syntax of C# properties, as well as PHP method declarations as much as possible. | ||
Line 200: | Line 200: | ||
In this syntax, a semi-colon exists at the end of the property definition. | In this syntax, a semi-colon exists at the end of the property definition. | ||
- | **__Alternative | + | **__Alternative |
<code php> | <code php> | ||
Line 274: | Line 274: | ||
public property Minutes | public property Minutes | ||
{ | { | ||
- | set { $this->minutes | + | set { $this->seconds |
} | } | ||
}; | }; | ||
Line 504: | Line 504: | ||
echo TimePeriod:: | echo TimePeriod:: | ||
</ | </ | ||
+ | |||
+ | ===== Implementation ===== | ||
+ | |||
+ | An implementation of this proposal is being worked on by Clint Priest <phpdev at zerocue dot com> | ||
===== References ===== | ===== References ===== | ||
Line 517: | Line 521: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
===== Changelog ===== | ===== Changelog ===== | ||
Line 532: | Line 540: | ||
- 2010-11-13 Dennis Robinson: Added a note below the basic syntax about new keywords being created. | - 2010-11-13 Dennis Robinson: Added a note below the basic syntax about new keywords being created. | ||
- 2010-11-13 Dennis Robinson: Added a semicolon to the " | - 2010-11-13 Dennis Robinson: Added a semicolon to the " | ||
+ | - 2010-11-29 jbondc: Added another alternative syntax | ||
+ | - 2010-12-01 Dennis Robinson: Added additional links in the " | ||
+ | - 2011-12-22 Dennis Robinson: Added " |
rfc/propertygetsetsyntax.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1