RE: [PHP-DEV] getters/setters project
| From: | Clint M Priest | Date: | Mon, 23 Jan 2012 14:21:48 +0000 |
| Subject: | RE: [PHP-DEV] getters/setters project | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-57480@lists.php.net to get a copy of this message | ||
Your code example below (with an appropriate getter written) would become:
$foo->__setBar('a')->doSomething() and would work if you return $this at the end of
each of your setters.
-----Original Message-----
From: Christoph Rosse [mailto:cr@okto.tv]
Sent: Monday, January 23, 2012 2:11 AM
To: internals@lists.php.net
Subject: [PHP-DEV] getters/setters project
Hi,
I did not follow the whole getter / setter discussion completely and just have read the RFC https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented
.
I just wanted to know if the new getter/setter syntax will provide getter/setter methods as well, so
I can use fluent-interfaces?
$foo->setBar("a")->doSomething();
Or will I have to write getter / setter methods myself if I want to do this?
Thanks,
christoph
--
PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php