rfc:mixin
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
rfc:mixin [2008/09/10 00:15] – created jbondc | rfc:mixin [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 12: | Line 12: | ||
For a good summary and detailed research on the advantages, see: | For a good summary and detailed research on the advantages, see: | ||
- | [[http:// | + | [[http:// |
- | [[http:// | + | [[rfc/ |
- | More background about mixins here: | + | More background about [[http:// |
- | [[http:// | + | |
This proposal only introduces 1 keyword ' | This proposal only introduces 1 keyword ' | ||
Line 82: | Line 81: | ||
echo " | echo " | ||
- | // mixin:: | + | // mixin:: |
} | } | ||
} | } | ||
$s = new shoppingCart2; | $s = new shoppingCart2; | ||
- | $s-> | + | $s-> |
</ | </ | ||
Line 103: | Line 102: | ||
| | ||
{ | { | ||
- | | + | |
} | } | ||
Line 123: | Line 122: | ||
} | } | ||
} | } | ||
+ | |||
+ | class Company_Rogers extends Company_Telecom { | ||
+ | |||
+ | | ||
+ | { | ||
+ | echo parent:: | ||
+ | echo mixin:: | ||
+ | } | ||
+ | |||
+ | | ||
+ | | ||
+ | echo " | ||
+ | } | ||
+ | } | ||
+ | |||
</ | </ | ||
Line 152: | Line 166: | ||
The default php.ini would contain ~: | The default php.ini would contain ~: | ||
- | mixin.security = true # default and CANNOT be changed using set_ini() | + | mixin.security = true # default and CANNOT be changed using ini_set() |
<code php> | <code php> | ||
- | class_mixin(' | + | class_mixin(' |
</ | </ | ||
Line 176: | Line 190: | ||
===== Notes ===== | ===== Notes ===== | ||
- | There was interesting paper in the ACM (2006) about " | + | There was an [[http:// |
- | [[http:// | + | |
The goal here is to keep OO intuitive and allow for multiple inheritance "PHP style" | The goal here is to keep OO intuitive and allow for multiple inheritance "PHP style" |
rfc/mixin.1221005741.txt.gz · Last modified: 2017/09/22 13:28 (external edit)