If a value that needs to be stored is an array, will insert a new row for each value of this array.
Inheritance: implements Piwik\Settings\Storage\Backend\BackendInterface
Esempio n. 1
0
 public function cleanupUser($userLogin)
 {
     PluginSettingsTable::removeAllUserSettingsForUser($userLogin);
 }
Esempio n. 2
0
 /**
  * Uninstalls a Plugin (deletes plugin files from the disk)
  * Only deactivated plugins can be uninstalled
  *
  * @param $pluginName
  * @throws \Exception
  * @return bool
  */
 public function uninstallPlugin($pluginName)
 {
     if ($this->isPluginLoaded($pluginName)) {
         throw new \Exception("To uninstall the plugin {$pluginName}, first disable it in Piwik > Settings > Plugins");
     }
     $this->loadAllPluginsAndGetTheirInfo();
     SettingsStorage\Backend\PluginSettingsTable::removeAllSettingsForPlugin($pluginName);
     SettingsStorage\Backend\MeasurableSettingsTable::removeAllSettingsForPlugin($pluginName);
     $this->executePluginDeactivate($pluginName);
     $this->executePluginUninstall($pluginName);
     $this->removePluginFromPluginsInstalledConfig($pluginName);
     $this->unloadPluginFromMemory($pluginName);
     $this->removePluginFromConfig($pluginName);
     $this->removeInstalledVersionFromOptionTable($pluginName);
     $this->clearCache($pluginName);
     self::deletePluginFromFilesystem($pluginName);
     if ($this->isPluginInFilesystem($pluginName)) {
         return false;
     }
     /**
      * Event triggered after a plugin has been uninstalled.
      *
      * @param string $pluginName The plugin that has been uninstalled.
      */
     Piwik::postEvent('PluginManager.pluginUninstalled', array($pluginName));
     return true;
 }