Refactoring: * Break out the database access part of UserOptionsManager to a separate class hierarchy implementing interface UserOptionsStore. It's basically a key/key/string-value store, very simple. The complex parts of user options storage remain in UserOptionsManager. * Bundle the UserOptionsManager caches into a per-user cache object. I was adding a couple more and it was getting tedious. Start integrating GlobalPreferences with UserOptionsManager: * Have an array of stores. There's always a local store, and extensions can add stores via an attribute. * Add $global parameter to UserOptionsManager::setOption(), allowing this method to update or override global options. * Rename loadOptionsFromDb to loadOptionsFromStore. * Move the local override feature from GlobalPreferences to core. Bug: T323076 Change-Id: Ib3623b723557c819bc0ffdf21a4ffcb070eb298b |
||
|---|---|---|
| .. | ||
| DefaultOptionsLookupTest.php | ||
| UserOptionsLookupTestBase.php | ||
| UserOptionsManagerTest.php | ||