rfc:lsb_parentself_forwarding
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
rfc:lsb_parentself_forwarding [2008/07/22 13:55] – created colder | rfc:lsb_parentself_forwarding [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2008-07-22 | * Date: 2008-07-22 | ||
* Author: Etienne Kneuss < | * Author: Etienne Kneuss < | ||
- | * Status: | + | * Status: |
===== Introduction ===== | ===== Introduction ===== | ||
- | This RFC covers the change that occured to Late Static Bindings (LSB) prior to it' | + | This RFC covers the change that occured to Late Static Bindings (LSB) prior to its first alpha release. |
==== Terms and concepts ==== | ==== Terms and concepts ==== | ||
- | LSB works by passing the original call info to the function, used then by static:: or get_called_class to get the original class name used. This information will only be useful in case a {{fallback}} occurs, which takes place when you call a static method that only exists in one of the parent classes. | + | LSB works by passing the original call info to the function, used then by '' |
<code php> | <code php> | ||
<?php | <?php | ||
Line 27: | Line 27: | ||
echo C::who(); // C | echo C::who(); // C | ||
?> | ?> | ||
- | </ | + | </ |
Now let's say that you want to overwrite who in B, but still rely on A's who(): | Now let's say that you want to overwrite who in B, but still rely on A's who(): | ||
Line 50: | Line 50: | ||
echo C::who(); // ?? | echo C::who(); // ?? | ||
?> | ?> | ||
- | </ | + | </ |
- | Now, depending on how you call A's who() from B::who(), you might get different results for the c::who() call: | + | Now, depending on how you call A' |
- | C, if the call was {{forwarding}} | + | |
- | A, if the call wasn' | + | |
===== The change ===== | ===== The change ===== | ||
- | Previously, A::who() and parent:: | + | Previously, |
- | ===== Proposal | + | With the change, a difference between '' |
- | Nothing needs to be patched here. Just use this template at your discretion. | + | Note that '' |
- | + | ||
- | ==== Rejected Features ==== | + | |
- | + | ||
- | Automated voting system. | + | |
- | + | ||
- | ==== More about RFCs ==== | + | |
- | + | ||
- | http:// | + | |
- | + | ||
- | ===== Changelog ===== | + | |
+ | ===== ML Discussion ===== | ||
+ | http:// | ||
rfc/lsb_parentself_forwarding.1216734937.txt.gz · Last modified: 2017/09/22 13:28 (external edit)