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
Exemple #1
0
 public function onSiteDeleted($idSite)
 {
     // we do not delete logs here on purpose (you can run these queries on the log_ tables to delete all data)
     Cache::deleteCacheWebsiteAttributes($idSite);
     $archiveInvalidator = StaticContainer::get('Piwik\\Archive\\ArchiveInvalidator');
     $archiveInvalidator->forgetRememberedArchivedReportsToInvalidateForSite($idSite);
     MeasurableSettingsTable::removeAllSettingsForSite($idSite);
 }
Exemple #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;
 }