Use autoloader for PHP data files instead of include/require
authorTim Starling <tstarling@wikimedia.org>
Fri, 29 Jan 2016 05:19:58 +0000 (16:19 +1100)
committerTim Starling <tstarling@wikimedia.org>
Sat, 30 Jan 2016 02:08:46 +0000 (13:08 +1100)
commitf43e0d840f8c9729e340b703868dc60b74336d5a
tree0bb0d305e9b1f6a2ca2b7307b7af4591553e4f34
parent6a161cefbf3edb3099bbbfad9bd17fe8d9ada62e
Use autoloader for PHP data files instead of include/require

Move ZhConversion.php and Names.php to languages/data and make them both
expose their data as static class variables instead of in the local
scope. This means that the autoloader can be used to load the data,
which is efficient and secure. This also makes additional request-local
caching of the arrays unnecessary.

Change-Id: Iafb96ac4165d0965fcb9a69f1d0a91139ea9790c
12 files changed:
autoload.php
includes/DefaultSettings.php
includes/ZhConversion.php [deleted file]
includes/installer/LocalSettingsGenerator.php
languages/Language.php
languages/Names.php [deleted file]
languages/classes/LanguageGan.php
languages/classes/LanguageZh.php
languages/data/Names.php [new file with mode: 0644]
languages/data/ZhConversion.php [new file with mode: 0644]
maintenance/language/zhtable/Makefile
maintenance/language/zhtable/Makefile.py