rfc:static-classes

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
Last revisionBoth sides next revision
rfc:static-classes [2008/05/05 21:05] – __setStatic()/__getStatic() lstrojnyrfc:static-classes [2008/05/10 11:25] – Interface clarification lstrojny
Line 40: Line 40:
 AbstractStaticClass2::staticMethod(); // Throws error, not allowed. Must be extended first AbstractStaticClass2::staticMethod(); // Throws error, not allowed. Must be extended first
 </code> </code>
 +
 +
  
  
Line 52: Line 54:
   * The current behaviour of abstract classes/non-static classes with static members **would not** change. This is important for backwards compatibility   * The current behaviour of abstract classes/non-static classes with static members **would not** change. This is important for backwards compatibility
   * ''%%__setStatic()%%'' and ''%%__getStatic()%%'' **will** provide functionality similiar to ''%%__get()%%'' and ''%%__set()%%''   * ''%%__setStatic()%%'' and ''%%__getStatic()%%'' **will** provide functionality similiar to ''%%__get()%%'' and ''%%__set()%%''
 +  * Static classes **cannot** be instantiated
 +  * Static classes **can** implement interfaces containing only static methods
  
 ===== Code ===== ===== Code =====
rfc/static-classes.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1