rfc:object-model-improvements
Differences
This shows you the differences between two versions of the page.
rfc:object-model-improvements [2011/02/25 22:39] martinscotta |
rfc:object-model-improvements [2017/09/22 13:28] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Request for Comments: How to write RFCs ====== | ||
- | * Version: 1.0 | ||
- | * Date: 2008-03-06 | ||
- | * Author: Martin Scotta <martinscotta@gmail.com> | ||
- | * Status: Under Discussion | ||
- | * First Published at: http://wiki.php.net/rfc/object-model-improvements | ||
- | |||
- | |||
- | ===== Introduction ===== | ||
- | |||
- | The purpose of RFCs is to improve the current PHP5 object model. | ||
- | |||
- | |||
- | ==== Why do we need this ==== | ||
- | |||
- | Actual PHP5 object model provides the basic for Object Oriented programming but it lacks for support for library or third parties developers. | ||
- | |||
- | ==== New Features ==== | ||
- | - Constructors | ||
- | * Provide a default empty constructor (if applicable) | ||
- | * Remove the inheritance | ||
- | * Disallow directly calls to them | ||
- | * Ensure constructor call on parent classes | ||
- | |||
- | - Magic methods: | ||
- | * disallow directly call from outer context? | ||
- | * markers interfaces | ||
- | |||
- | - class / interface | ||
- | * provide a magic constant with the fully qualified class name | ||
- | <code> | ||
- | namespace Test { | ||
- | class Bar {} | ||
- | var_dump( Bar::CLASS ); // string "Test\Bar" | ||
- | } | ||
- | </code> | ||
- | |||
- | ===== Changelog ===== | ||
- | |||
- | |||
rfc/object-model-improvements.txt · Last modified: 2017/09/22 13:28 (external edit)