当前位置: 首页>>代码示例>>PHP>>正文


PHP Piwik::deleteAllCacheOnUpdate方法代码示例

本文整理汇总了PHP中Piwik::deleteAllCacheOnUpdate方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik::deleteAllCacheOnUpdate方法的具体用法?PHP Piwik::deleteAllCacheOnUpdate怎么用?PHP Piwik::deleteAllCacheOnUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Piwik的用法示例。


在下文中一共展示了Piwik::deleteAllCacheOnUpdate方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: welcome

 /**
  * Installation Step 1: Welcome
  */
 function welcome($message = false)
 {
     // Delete merged js/css files to force regenerations based on updated activated plugin list
     Piwik::deleteAllCacheOnUpdate();
     $view = new Piwik_Installation_View($this->pathView . 'welcome.tpl', $this->getInstallationSteps(), __FUNCTION__);
     $view->newInstall = !file_exists(Piwik_Config::getLocalConfigPath());
     $view->errorMessage = $message;
     $this->skipThisStep(__FUNCTION__);
     $view->showNextStep = $view->newInstall;
     $this->session->currentStepDone = __FUNCTION__;
     echo $view->render();
 }
开发者ID:0h546f6f78696342756e4e59,项目名称:piwik,代码行数:15,代码来源:Controller.php

示例2: dispatch

 function dispatch()
 {
     $module = Piwik_Common::getRequestVar('module', '', 'string');
     $updater = new Piwik_Updater();
     $updater->addComponentToCheck('core', Piwik_Version::VERSION);
     $updates = $updater->getComponentsWithNewVersion();
     if (!empty($updates)) {
         Piwik::deleteAllCacheOnUpdate();
     }
     if (self::getComponentUpdates($updater) !== null && $module != 'CoreUpdater' && $module != 'Proxy') {
         if (Piwik_FrontController::shouldRethrowException()) {
             throw new Exception("Piwik and/or some plugins have been upgraded to a new version. Please run the update process first. See documentation: http://piwik.org/docs/update/");
         } else {
             Piwik::redirectToModule('CoreUpdater');
         }
     }
 }
开发者ID:nnnnathann,项目名称:piwik,代码行数:17,代码来源:CoreUpdater.php

示例3: dispatch

	function dispatch()
	{
		$module = Piwik_Common::getRequestVar('module', '', 'string');
		$updater = new Piwik_Updater();
		$updater->addComponentToCheck('core', Piwik_Version::VERSION);
		$updates = $updater->getComponentsWithNewVersion();
		if(!empty($updates))
		{
			Piwik::deleteAllCacheOnUpdate();
		}
		if(self::getComponentUpdates($updater) !== null 
			&& $module != 'CoreUpdater'
			// Proxy module is used to redirect users to piwik.org, should still work when Piwik must be updated
			&& $module != 'Proxy')
		{
			Piwik::redirectToModule('CoreUpdater');
		}
	}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:18,代码来源:CoreUpdater.php

示例4: activatePlugin

 /**
  * Activate the specified plugin and install (if needed)
  *
  * @param string  $pluginName  Name of plugin
  * @throws Exception
  */
 public function activatePlugin($pluginName)
 {
     $plugins = Piwik_Config::getInstance()->Plugins['Plugins'];
     if (in_array($pluginName, $plugins)) {
         throw new Exception("Plugin '{$pluginName}' already activated.");
     }
     $existingPlugins = $this->readPluginsDirectory();
     if (array_search($pluginName, $existingPlugins) === false) {
         Piwik::log("Unable to find the plugin '{$pluginName}' in activatePlugin.");
         return;
     }
     $plugin = $this->loadPlugin($pluginName);
     if ($plugin === null) {
         return;
     }
     $this->installPluginIfNecessary($plugin);
     $plugin->activate();
     // we add the plugin to the list of activated plugins
     if (!in_array($pluginName, $plugins)) {
         $plugins[] = $pluginName;
     } else {
         // clean up if we find a dupe
         $plugins = array_unique($plugins);
     }
     // the config file will automatically be saved with the new plugin
     $this->updatePluginsConfig($plugins);
     Piwik_Config::getInstance()->forceSave();
     // Delete merged js/css files to force regenerations to include the activated plugin
     Piwik::deleteAllCacheOnUpdate();
 }
开发者ID:nomoto-ubicast,项目名称:piwik,代码行数:36,代码来源:PluginsManager.php

示例5: doExecuteUpdates

 private function doExecuteUpdates($view, $updater, $componentsWithUpdateFile)
 {
     $this->loadAndExecuteUpdateFiles($updater, $componentsWithUpdateFile);
     Piwik::deleteAllCacheOnUpdate();
     $view->coreError = $this->coreError;
     $view->warningMessages = $this->warningMessages;
     $view->errorMessages = $this->errorMessages;
     $view->deactivatedPlugins = $this->deactivatedPlugins;
     echo $view->render();
 }
开发者ID:Gninety,项目名称:Microweber,代码行数:10,代码来源:Controller.php

示例6: activatePlugin

	/**
	 * Activate the specified plugin and install (if needed)
	 *
	 * @param string $pluginName Name of plugin
	 */
	public function activatePlugin($pluginName)
	{
		$plugins = Zend_Registry::get('config')->Plugins->Plugins->toArray();
		if(in_array($pluginName,$plugins))
		{
			throw new Exception("Plugin '$pluginName' already activated.");
		}

		$existingPlugins = $this->readPluginsDirectory();
		if( array_search($pluginName,$existingPlugins) === false)
		{
			throw new Exception("Unable to find the plugin '$pluginName'.");
		}

		$plugin = $this->loadPlugin($pluginName);

		$this->installPluginIfNecessary($plugin);

		// we add the plugin to the list of activated plugins
		$plugins[] = $pluginName;

		// the config file will automatically be saved with the new plugin
		Zend_Registry::get('config')->Plugins = $plugins;

		// Delete merged js/css files to force regenerations to include the activated plugin
		Piwik::deleteAllCacheOnUpdate();
	}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:32,代码来源:PluginsManager.php


注:本文中的Piwik::deleteAllCacheOnUpdate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。