rfc:propertygetsetsyntax-as-implemented:change-requests

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:propertygetsetsyntax-as-implemented:change-requests [2012/12/30 21:25] – [TODO] cpriestrfc:propertygetsetsyntax-as-implemented:change-requests [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 8: Line 8:
 <del>[[https://github.com/cpriest/php-src/issues/6|https://github.com/cpriest/php-src/issues/6]]</del> <del>[[https://github.com/cpriest/php-src/issues/6|https://github.com/cpriest/php-src/issues/6]]</del>
  
-Change syntax to use public set($value) {}, public get(), etcAlong with that means no “magic” $value in the setter+Allow syntax to use parenthesized syntax as well so that both a [TypeHint] and $value may be specified. 
 <code php> <code php>
 class TimePeriod { class TimePeriod {
Line 21: Line 22:
 } }
 </code> </code>
 +
 +The abbreviated syntax is also allowed as per 1.1 RFC.
  
 ==== read-only / write-only keywords ==== ==== read-only / write-only keywords ====
Line 169: Line 172:
 Stas suggested that he could either help me to implement this more appropriately (such as changing the engine to make calls into zend_object_handler.c) so that these calls can be resolved dynamically, or that static accessors be shelved for a future version of accessors. Stas suggested that he could either help me to implement this more appropriately (such as changing the engine to make calls into zend_object_handler.c) so that these calls can be resolved dynamically, or that static accessors be shelved for a future version of accessors.
  
 +**Update 12/30/2012**: Too much engine work is necessary to implement static accessors, this is being pushed to a future RFC change.
 ===== TODO ===== ===== TODO =====
   - <del>Exceptions thrown from an accessor reveal underlying implementation details</del> [[https://github.com/cpriest/php-src/issues/14|github#14]]   - <del>Exceptions thrown from an accessor reveal underlying implementation details</del> [[https://github.com/cpriest/php-src/issues/14|github#14]]
rfc/propertygetsetsyntax-as-implemented/change-requests.1356902750.txt.gz · Last modified: 2017/09/22 13:28 (external edit)