Unregister a plugin in the Debug Bar

@param string $plugin
@return ZFDebug_Controller_Plugin_Debug
320146
public function unregisterPlugin($plugin)
    {
        if (false !== strpos($plugin, '_')) {
            foreach ($this->_plugins as $key => $_plugin) {
                if ($plugin == get_class($_plugin)) {
                    unset($this->_plugins[$key]);
                }
            }
        } else {
            $plugin = strtolower($plugin);
            if (isset($this->_plugins[$plugin])) {
                unset($this->_plugins[$plugin]);
            }
        }
        return $this;
    }
109670
public function unload($objectName)
    {
        if (empty($this->_loaded[$objectName])) {
            list($plugin, $objectName) = pluginSplit($objectName);
            $this->_throwMissingClassError($objectName, $plugin);
        }

        $object = $this->_loaded[$objectName];
        if ($this instanceof EventDispatcherInterface && $object instanceof EventListenerInterface) {
            $this->getEventManager()->off($object);
        }
        unset($this->_loaded[$objectName]);

        return $this;
    }
1147915
public function removePageSessionPluginAction()
    {
        $module = $this->getRequest()->getQuery('module', null);
        $pluginName = $this->getRequest()->getQuery('pluginName', '');
        $pageId = $this->getRequest()->getQuery('pageId', null);
        $pluginId = $this->getRequest()->getQuery('pluginId', null);
        $pluginTag = $this->getRequest()->getQuery('pluginTag', null);
        
        $parameters = array(
            'module' => $module,
            'pluginName' => $pluginName,
            'pageId' => $pageId,
            'pluginId' => $pluginId,
            'pluginTag' => $pluginTag,
        );
        
        $translator = $this->serviceLocator->get('translator');

        if (empty($module) || empty($pluginName) || empty($pageId) || empty($pluginId))
        {

            $result = array(
                'success' => 0,
                'errors' => array(array('empty' => $translator->translate('tr_meliscms_form_common_errors_Empty datas')))
            );
        }
        else
        {

            $this->getEventManager()->trigger('meliscms_page_removesession_plugin_start', null, $parameters);
            
            // removing plugin from session
            $container = new Container('meliscms');
            if (!empty($container['content-pages'][$pageId][$pluginTag][$pluginId]))
                unset($container['content-pages'][$pageId][$pluginTag][$pluginId]);
            
            $this->getEventManager()->trigger('meliscms_page_removesession_plugin_end', null, $parameters);
            
            $result = array(
                'success' => 1,
                'errors' => array()
            );
        }
         
        return new JsonModel($result);
    }
244543
protected function detachPlugins($event)
    {
        if (\is_array($event->component->plugins_backend)) {
            foreach ($event->component->plugins_backend as $key_plugin => $value_plugin) {
                //Detach SEO plugin
                if ($key_plugin === 'seo' && $seo = LarrockAdminSeo::getModel()->whereSeoIdConnect($event->model->id)
                        ->whereSeoTypeConnect($event->component->name)->first()) {
                    $seo->delete();
                }
            }
        }
    }
339183
public function deactivatePlugin($pluginName)
    {
        $this->clearCache($pluginName);

        // execute deactivate() to let the plugin do cleanups
        $this->executePluginDeactivate($pluginName);

        $this->unloadPluginFromMemory($pluginName);

        $this->removePluginFromConfig($pluginName);

        /**
         * Event triggered after a plugin has been deactivated.
         *
         * @param string $pluginName The plugin that has been deactivated.
         */
        Piwik::postEvent('PluginManager.pluginDeactivated', array($pluginName));
    }
1105102
public function unregister($alias)
    {
        $this->_collection->remove($alias);
        $this->remove($alias);
        return $this;
    }
216761
public function removePlugin(\BlackForest\PiwikBundle\Entity\PiwikPlugin $plugin)
    {
        return $this->plugin->removeElement($plugin);
    }
1074614
public static function uninstall()
	{
		$results = array();

		//see if any mods from jfusion plugins need to be removed
		$plugins = Factory::getPlugins('all', false, 0);
		foreach($plugins as $plugin) {
			$model = new Plugin();
			$result = $model->uninstall($plugin->name);

			$r = new stdClass();
			$result['status'] = 1;
			$r->status = $result['status'];

			if (!$r->status) {
				$r->message = Text::_('UNINSTALL') . ' ' . $plugin->name . ' ' . Text::_('FAILED');
			} else {
				$r->message = Text::_('UNINSTALL') . ' ' . $plugin->name . ' ' . Text::_('SUCCESS');
			}

			$results[] = $r;
		}

		//remove the jfusion tables.
		$db = Factory::getDBO();
		$query = 'DROP TABLE IF EXISTS #__jfusion';
		$db->setQuery($query);
		$db->execute();

		$query = 'DROP TABLE IF EXISTS #__jfusion_sync';
		$db->setQuery($query);
		$db->execute();

		$query = 'DROP TABLE IF EXISTS #__jfusion_sync_details';
		$db->setQuery($query);
		$db->execute();

		$query = 'DROP TABLE IF EXISTS #__jfusion_users';
		$db->setQuery($query);
		$db->execute();
		return $results;
	}
12804
public function detachPlugin($name)
    {
        $this->plugins[$name]->unregister();
        unset($this->plugins[$name]);
        return $this;
    }
7751
public function unregister()
    {
        $this->files->unregister();
        $this->psr0->unregister();
        $this->psr4->unregister();

        return $this;
    }
1354986
public function registerPlugin(array $plugin)
    {
        /* Dont't process nameless plugins */
        if(! isset($plugin['name'])) return;

        /* Create a container for the plugin */
        $this->getContainer()->addPlugin($plugin['name']);

        /* Commands are registered first so they can be found be porcedures */
        if(isset($plugin['commands'])) {
            $this->registerCommands($plugin['name'], $plugin['commands']);
        }

        if(isset($plugin['procedures'])) {
            /* The path info is appended by ComposerScripts */
            $this->registerProcedures($plugin['name'], $plugin['procedures'], $plugin['path']);
        }

        if(isset($plugin['settings'])) {
            $this->registerSettings($plugin['name'], $plugin[ 'settings' ]);
        }
    }
519052
public function unregister(PluginBundleInterface $plugin)
    {
        $pluginFqcn = get_class($plugin);
        $this->dbWriter->delete($pluginFqcn);
    }
628490
public function isVagrantPluginInstalled($plugin) {
    $installed = (bool) $this->executor->execute("vagrant plugin list | grep '$plugin'")
      ->interactive(FALSE)
      ->silent(TRUE)
      ->run()
      ->getMessage();

    return $installed;
  }
786245
public function unregisterFunction($name)
    {
        if(isset($this->__functions[$name])) {
            unset($this->__functions[$name]);
        }

        return $this;
    }
1293264
public function unregister($name)
    {
        if ($this->exists($name)) {
            $this->handlers->remove($name);
        }

        return $this;
    }
770290
public function uninstallPlugin($pluginName)
    {
        if ($this->isPluginLoaded($pluginName)) {
            throw new \Exception("To uninstall the plugin $pluginName, first disable it in Matomo > 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;
    }
817659
public function disablePlugin($pluginName)
	{
		if (isset($this->pluginsConfig[$pluginName]))
		{
			// Copy the plugin's config to remove the reference
			$pluginConfig = $this->pluginsConfig[$pluginName];
			unset($this->pluginsConfig[$pluginName]);

			// Update the value and replace the plugin's config
			$pluginConfig['isDisabled'] = true;
			$this->pluginsConfig[$pluginName] = $pluginConfig;
		}
	}