(REF) dev/core#1724 - SettingsBag - Convert to computeVirtual/updateVirtual
authorTim Otten <totten@civicrm.org>
Tue, 28 Apr 2020 21:14:45 +0000 (14:14 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 28 Apr 2020 22:42:37 +0000 (15:42 -0700)
commit8f2a141a09e91f680ecd1f0a7d0a61777a2d2586
tree6b07fcf7eb8a08a9ee5e79f77c2db67f20688753
parentc84199671846e3ff492319fffedca9e0fc3c18f0
(REF) dev/core#1724 - SettingsBag - Convert to computeVirtual/updateVirtual

The `SettingsBag` uses the `$combined` property to (locally) cache a full
view of the active settings (based on combining different layers of data --
default-values, explicit-values, and mandatory-values). This design is
good for read-mostly data.

This patch changes the `__ContributionSettings` to be another layer in the
construction of `$combined` -- the virtual-values layer.  It fixes issues
wherein:

1. The virtual value is recomputed during every call to `get($key)`.

2. The virtual value is only based on explicit-values -- it disregards
   default-values and mandatory-values.
Civi/Core/SettingsBag.php