rfc:static-classes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rfc:static-classes [2008/05/05 21:05]
lstrojny __setStatic()/__getStatic()
rfc:static-classes [2017/09/22 13:28] (current)
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.1210021558.txt.gz · Last modified: 2017/09/22 13:28 (external edit)