function namespacePrivateSetting($type, $name, $id = null)
{
switch ($type) {
// commented out because it breaks $plugin->$name access to variables
//case 'setting':
// $name = ELGG_PLUGIN_SETTING_PREFIX . $name;
// break;
case 'user_setting':
if (!$id) {
throw new \InvalidArgumentException("You must pass the plugin id for user settings");
}
$name = ELGG_PLUGIN_USER_SETTING_PREFIX . "{$id}:{$name}";
break;
case 'internal':
$name = ELGG_PLUGIN_INTERNAL_PREFIX . $name;
break;
}
return $name;
}