rfc:protectedlookup

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
Next revisionBoth sides next revision
rfc:protectedlookup [2008/06/03 13:35] robinfrfc:protectedlookup [2008/06/03 13:37] – fix typo in code sample robinf
Line 254: Line 254:
 ===== Appendix ===== ===== Appendix =====
 ==== Other potential LSP violations ==== ==== Other potential LSP violations ====
-If Option 1 is rejected on ground of breach of LSP, then other arguable violations of LSP should be reviewed too. +If Option 1 is rejected on the grounds of breach of LSP, then other arguable violations of LSP should be reviewed too. 
 Below is a list of examples to be considered. Below is a list of examples to be considered.
 === Private static methods === === Private static methods ===
Line 293: Line 293:
       echo $liskov->a . "\n"; // if $liskov instanceof C, falls back to P::$a       echo $liskov->a . "\n"; // if $liskov instanceof C, falls back to P::$a
       echo "Static property access call on $class: ";       echo "Static property access call on $class: ";
-      echo C::$sa . "\n"; // if $liskov instanceof C, does not fall back to P::$sa - fatal error.+      echo $class::$sa . "\n"; // if $liskov instanceof C, does not fall back to P::$sa - fatal error.
    }    }
 } }
rfc/protectedlookup.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1