本文整理汇总了PHP中Piwik::dropDatabase方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik::dropDatabase方法的具体用法?PHP Piwik::dropDatabase怎么用?PHP Piwik::dropDatabase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik
的用法示例。
在下文中一共展示了Piwik::dropDatabase方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct($title = '')
{
parent::__construct($title);
print "The test class extends Test_Database: the test Piwik database is created once in the constructor, and all tables are truncated at the end of EACH unit test method.<br>";
Piwik::createConfigObject();
Piwik::createDatabaseObject();
Zend_Registry::get('config')->setTestEnvironment();
Zend_Registry::get('config')->disableSavingConfigurationFileUpdates();
Piwik::createLogObject();
Piwik::dropDatabase();
Piwik::createDatabase();
Piwik::disconnectDatabase();
Piwik::createDatabaseObject();
Piwik::createTables();
}
示例2: __construct
function __construct($title = '')
{
parent::__construct($title);
try {
Piwik::createConfigObject();
Piwik_Config::getInstance()->setTestEnvironment();
Piwik::createDatabaseObject();
Piwik::createLogObject();
Piwik::dropDatabase();
Piwik::createDatabase();
Piwik::disconnectDatabase();
Piwik::createDatabaseObject();
Piwik::createTables();
Piwik_PluginsManager::getInstance()->installLoadedPlugins();
} catch (Exception $e) {
echo $e->getMessage();
echo "<br/><b>TEST INITIALIZATION FAILED!";
throw $e;
}
}
示例3: 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();
}
示例4: 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;
}