Issue Feature Closed

#19503Implement autoloading for TYPO3

Dmitry Dulepov 10/24/08, 10:04 updated 08/06/10, 13:24

Description

The attached patch implements autoloading for TYPO3 classes.

The patch consists from two files. The first file adds autoloading, the second file changes TYPO3 Frontend to use autoloading.

Autoloading is based on the concept of class registry and uses SPL to add TYPO3 autoloader to the chain of system autoloaders.

Class registry consists from two groups, each group contains two files.

The first group is located at t3lib/stddb/autoload_*.ser and includes information about all classes from t3lib/ and typo3/ directories. This group is used when TYPO3 is just installed.

The second group consists from files with the same name in typo3conf/ directory. These files are unique for the installation and list classes for core + installed extensions. Extension Manager updates these files when extension is installed or uninstalled. This group reduced memory usage at runtime.

Registry exists for Frontend and Backend. Frontend version does not include Backend classes from typo3/ directory (but includes typo3/ext/ and typo3/sysext/).

When user just installs TYPO3, he can login to the system. The big yellow box will prompt him to update autoloader database and provide a link to Tools>DB module. Additionally command line script exists to update autoloader data if something goes wrong in Backend.

The second file removes require_once calls from TYPO3 Frontend and thus can be used as demo/test for autoloader feature.

(issue imported from #M9633)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.