本文整理汇总了PHP中Piwik_Common::deleteTrackerCache方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik_Common::deleteTrackerCache方法的具体用法?PHP Piwik_Common::deleteTrackerCache怎么用?PHP Piwik_Common::deleteTrackerCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik_Common
的用法示例。
在下文中一共展示了Piwik_Common::deleteTrackerCache方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
public function tearDown()
{
parent::tearDown();
Piwik_DataTable_Manager::getInstance()->deleteAll();
Piwik_Option::getInstance()->clearCache();
Piwik_Common::deleteTrackerCache();
Piwik_Site::clearCache();
Piwik::truncateAllTables();
Piwik_TablePartitioning::$tablesAlreadyInstalled = null;
}
示例2: tearDown
/**
* Resets all caches and drops the database
*/
public function tearDown()
{
parent::tearDown();
try {
$plugins = Piwik_PluginsManager::getInstance()->getLoadedPlugins();
foreach ($plugins as $plugin) {
$plugin->uninstall();
}
Piwik_PluginsManager::getInstance()->unloadPlugins();
} catch (Exception $e) {
}
Piwik::dropDatabase();
Piwik_DataTable_Manager::getInstance()->deleteAll();
Piwik_Option::getInstance()->clearCache();
Piwik_Site::clearCache();
Piwik_Common::deleteTrackerCache();
Piwik_Config::getInstance()->clear();
Piwik_TablePartitioning::$tablesAlreadyInstalled = null;
Zend_Registry::_unsetInstance();
}
示例3: tearDownAfterClass
public static function tearDownAfterClass()
{
try {
$plugins = Piwik_PluginsManager::getInstance()->getLoadedPlugins();
foreach ($plugins as $plugin) {
$plugin->uninstall();
}
Piwik_PluginsManager::getInstance()->unloadPlugins();
} catch (Exception $e) {
}
Piwik::dropDatabase();
Piwik_DataTable_Manager::getInstance()->deleteAll();
Piwik_Option::getInstance()->clearCache();
Piwik_Site::clearCache();
Piwik_Common::deleteTrackerCache();
Piwik_Config::getInstance()->clear();
Piwik_TablePartitioning::$tablesAlreadyInstalled = null;
Zend_Registry::_unsetInstance();
$_GET = $_REQUEST = array();
Piwik_Translate::getInstance()->unloadEnglishTranslation();
// re-enable tag cloud shuffling
Piwik_Visualization_Cloud::$debugDisableShuffle = true;
}
示例4: setUserAccess
/**
* Set an access level to a given user for a list of websites ID.
*
* If access = 'noaccess' the current access (if any) will be deleted.
* If access = 'view' or 'admin' the current access level is deleted and updated with the new value.
*
* @param string $userLogin The user login
* @param string $access Access to grant. Must have one of the following value : noaccess, view, admin
* @param int|array $idSites The array of idSites on which to apply the access level for the user.
* If the value is "all" then we apply the access level to all the websites ID for which the current authentificated user has an 'admin' access.
*
* @throws Exception if the user doesn't exist
* @throws Exception if the access parameter doesn't have a correct value
* @throws Exception if any of the given website ID doesn't exist
*
* @return bool true on success
*/
public function setUserAccess($userLogin, $access, $idSites)
{
$this->checkAccessType($access);
$this->checkUserExists($userLogin);
$this->checkUserIsNotSuperUser($userLogin);
if ($userLogin == 'anonymous' && $access == 'admin') {
throw new Exception(Piwik_TranslateException("UsersManager_ExceptionAdminAnonymous"));
}
// in case idSites is null we grant access to all the websites on which the current connected user
// has an 'admin' access
if ($idSites === 'all') {
$idSites = Piwik_SitesManager_API::getInstance()->getSitesIdWithAdminAccess();
} elseif (!is_array($idSites)) {
$idSites = Piwik_Site::getIdSitesFromIdSitesString($idSites);
}
// it is possible to set user access on websites only for the websites admin
// basically an admin can give the view or the admin access to any user for the websites he manages
Piwik::checkUserHasAdminAccess($idSites);
$this->deleteUserAccess($userLogin, $idSites);
// delete UserAccess
$db = Zend_Registry::get('db');
// if the access is noaccess then we don't save it as this is the default value
// when no access are specified
if ($access != 'noaccess') {
foreach ($idSites as $idsite) {
$db->insert(Piwik_Common::prefixTable("access"), array("idsite" => $idsite, "login" => $userLogin, "access" => $access));
}
}
// we reload the access list which doesn't yet take in consideration this new user access
Zend_Registry::get('access')->reloadAccess();
Piwik_Common::deleteTrackerCache();
}
示例5: deleteAllCacheOnUpdate
/**
* Called on Core install, update, plugin enable/disable
* Will clear all cache that could be affected by the change in configuration being made
*/
public static function deleteAllCacheOnUpdate()
{
Piwik_AssetManager::removeMergedAssets();
Piwik_View::clearCompiledTemplates();
Piwik_Common::deleteTrackerCache();
}
示例6: setGlobalExcludedQueryParameters
/**
* Sets list of URL query parameters to be excluded on all websites.
* Will also apply to websites created in the future.
*
* @param string Comma separated list of URL query parameters to exclude from URLs
* @return bool
*/
public function setGlobalExcludedQueryParameters($excludedQueryParameters)
{
Piwik::checkUserIsSuperUser();
$excludedQueryParameters = $this->checkAndReturnExcludedQueryParameters($excludedQueryParameters);
Piwik_SetOption(self::OPTION_EXCLUDED_QUERY_PARAMETERS_GLOBAL, $excludedQueryParameters);
Piwik_Common::deleteTrackerCache();
return true;
}
示例7: tearDown
public function tearDown()
{
parent::tearDown();
Piwik_DataTable_Manager::getInstance()->deleteAll();
Piwik_Option::getInstance()->clearCache();
Piwik_Site::clearCache();
Piwik_Common::deleteTrackerCache();
Piwik_TablePartitioning::$tablesAlreadyInstalled = null;
$tempTableName = Piwik_Common::prefixTable(Piwik_PrivacyManager_LogDataPurger::TEMP_TABLE_NAME);
Piwik_Query("DROP TABLE IF EXISTS " . $tempTableName);
}
示例8: ob_start
/**
* Proxy to normal piwik.php, but in testing mode
*
* - Use the tests database to record Tracking data
* - Allows to overwrite the Visitor IP, and Server datetime
*
* @see Main.test.php
*
*/
// Wrapping the request inside ob_start() calls to ensure that the Test
// calling us waits for the full request to process before unblocking
ob_start();
define('PIWIK_INCLUDE_PATH', '../../..');
define('PIWIK_USER_PATH', PIWIK_INCLUDE_PATH);
require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php';
require_once PIWIK_INCLUDE_PATH . '/core/Loader.php';
// Config files forced to use the test database
// Note that this also provides security for Piwik installs containing tests files:
// this proxy will not record any data in the production database.
Piwik::createConfigObject();
Piwik_Config::getInstance()->setTestEnvironment();
Piwik_Config::getInstance()->PluginsInstalled['PluginsInstalled'] = array();
Piwik_UserCountry_LocationProvider_GeoIp::$geoIPDatabaseDir = 'tests/lib/geoip-files';
Piwik_Tracker::setTestEnvironment();
Piwik_DataTable_Manager::getInstance()->deleteAll();
Piwik_Option::getInstance()->clearCache();
Piwik_Site::clearCache();
Piwik_Common::deleteTrackerCache();
include PIWIK_INCLUDE_PATH . '/piwik.php';
ob_end_flush();