Re: function call chaining
| From: | Stanislav Malyshev | Date: | Tue, 19 Jan 2010 20:09:53 +0000 |
| Subject: | Re: function call chaining | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-46829@lists.php.net to get a copy of this message | ||
Hi!
$eep->oop()->ork()->ah()->ah(); the newcomer will have to spend significant time rummaging around the source code to figure out what classes are involved.As opposed to: $oop = $eep->oop(); $ork = $oop->ork(); $ah = $ork->ah(); $ah2 = $ah->ah(); where it instantly becomes crystal clear! Come on, this argument of "I could read any code without ever knowing anything about anything but you feature broke it" is getting really stale. You couldn't, and the feature changed nothing. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com