26 private $datalist_cache;
31 private $config_values = [];
36 private $subtype_data = [];
41 private $active_plugins = [];
46 private $plugin_settings = [];
64 FROM {$db->prefix}datalists 65 WHERE `name` NOT IN ('__site_secret__', 'default_site', 'dataroot') 67 $this->datalist_cache =
new InMemory();
69 $this->datalist_cache->put($row->name, $row->value);
75 FROM {$db->prefix}entity_subtypes 77 foreach (
$rows as $row) {
78 $this->subtype_data[$row->id] =
$row;
82 $this->
site = $entities->
get($config->site_guid,
'site');
84 throw new \InstallationException(
"Unable to handle this request. This site is not configured or the database is down.");
90 FROM {$db->prefix}config 91 WHERE site_guid = {$config->site_guid} 93 foreach (
$rows as $row) {
94 $this->config_values[$row->name] = unserialize($row->value);
98 $this->active_plugins = $plugins->
find(
'active', $config->site_guid);
101 if (!$this->active_plugins) {
107 return $plugin->guid;
108 }, $this->active_plugins);
111 $limit = isset($config->bootdata_plugin_settings_limit) ? (int) $config->bootdata_plugin_settings_limit : 40;
113 $set = implode(
',',
$guids);
116 FROM {$db->prefix}private_settings 117 WHERE entity_guid IN ($set) 118 AND name NOT LIKE 'plugin:user_setting:%' 119 AND name NOT LIKE 'elgg:internal:%' 121 HAVING COUNT(*) > $limit 123 $unsuitable_guids = $db->
getData($sql,
function ($row) {
124 return (
int)$row->entity_guid;
132 $set = implode(
',',
$guids);
134 SELECT entity_guid, `name`, `value` 135 FROM {$db->prefix}private_settings 136 WHERE entity_guid IN ($set) 137 AND name NOT LIKE 'plugin:user_setting:%' 138 AND name NOT LIKE 'elgg:internal:%' 142 $this->plugin_settings = array_fill_keys(
$guids, []);
143 foreach (
$rows as $i => $row) {
144 $this->plugin_settings[$row->entity_guid][$row->name] = $row->value;
164 return $this->datalist_cache;
173 return $this->config_values;
182 return $this->subtype_data;
191 return $this->active_plugins;
200 return $this->plugin_settings;
$CONFIG site
The current site object.
getSite()
Get the site entity.
getConfigValues()
Get config values to merge into $CONFIG.
getDatalistCache()
Get the datalists cache.
getData($query, $callback=null, array $params=[])
Retrieve rows from the database.
An in-memory implementation of a cache pool.
find($status= 'active', $site_guid=null)
Returns an ordered list of plugins.
populate(\stdClass $config, Database $db, EntityTable $entities, Plugins $plugins)
Populate the boot data.
getPluginSettings()
Get the plugin settings (may not include all active plugins)
getActivePlugins()
Get active plugins.
getSubtypeData()
Get the subtype data.
if(!is_file("$autoload_root/vendor/autoload.php"))
Interates through each element of an array and calls callback a function.
Serializable collection of data used to boot Elgg.
Persistent, installation-wide key-value storage.
get($guid, $type= '')
Loads and returns an entity object from a guid.
http free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use