Piwik should use autoload (lazy load) classes instead of using require_once #620
Labels
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Major
Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone
Piwik should use autoload to automatically load the classes.
This would simplify the code, would make loading pages faster, as unecessary includes wouldn’t be loaded, and would greatly increase reusability of the code.
For example, Zend does it via`
Zend_Loader::registerAutoload();`
see the code on http://www.google.com/codesearch/p?hl=en#1oUPVh-C1Wg/trunk/eval/gx/zendframework/library/Zend/Loader.php&q=%22spl_autoload_register(array($class,%27autoload%27))%3B&l=32
Once implemented we can remove all require_once from all .php files.
The includes for the Piwik_\* (core/PluginsFunctions/*) shortcut functions would still be required and could all be merged in one include file.
The text was updated successfully, but these errors were encountered: