rfc:function_autoloading
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:function_autoloading [2013/08/30 12:28] – add constant benchmark ircmaxell | rfc:function_autoloading [2013/09/03 12:28] – Withdrawn ircmaxell | ||
---|---|---|---|
Line 4: | Line 4: | ||
* Date: 2013-08-29 | * Date: 2013-08-29 | ||
* Author: Anthony Ferrara < | * Author: Anthony Ferrara < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 261: | Line 261: | ||
It is more of a "why not" question. Supporting multiple types of autoloaded constructs in a single callback can result in a more flexible architecture for end users. | It is more of a "why not" question. Supporting multiple types of autoloaded constructs in a single callback can result in a more flexible architecture for end users. | ||
+ | |||
+ | ==== What Filename Conventions Does This Support? ==== | ||
+ | |||
+ | None, and all. This proposal presently implements no type of file loading handler. | ||
+ | |||
+ | The only thing that is implemented is the ability to register a callback to attempt to load a function or constant (or class) when it is missing. How the callback maps structures to files is outside of the scope of this RFC. | ||
+ | |||
+ | ==== Doesn' | ||
+ | |||
+ | Nope! The reason is that the current autoloading mechanism for classes is extremely fragile as is. | ||
+ | |||
+ | For example, the implementation hinges on a global variable which sets the php-level callback to call on autoload. This requires setting up a // | ||
+ | |||
+ | The implementation of // | ||
+ | |||
+ | This refactor cleans both of these pieces up significantly. | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== |
rfc/function_autoloading.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1