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 20:55] – Better use case examples lstrojnyrfc:static-classes [2008/05/10 11:25] – Interface clarification lstrojny
Line 41: Line 41:
 </code> </code>
  
-===== Object model rules =====+ 
 + 
 + 
 +===== Class model rules =====
 The following rules would apply for static classes: The following rules would apply for static classes:
  
Line 47: Line 50:
   * Static methods in abstract static classes **may not** be called. They must be extended first   * Static methods in abstract static classes **may not** be called. They must be extended first
   * In static classes, abstract static methods **are allowed** again   * In static classes, abstract static methods **are allowed** again
-  * Static classes **may not** have a constructor, destructor, dynamic interceptors or ''__toString()''+  * Static classes **may not** have a constructor, destructor, dynamic interceptors or ''%%__toString()%%''
   * Static classes **may not** extend non-static classes   * Static classes **may not** extend non-static classes
   * 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()%%'' 
- +  * 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