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


PHP Translate::reset方法代码示例

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


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

示例1: changeLanguage

 /**
  * changing the language within one request is a bit fancy
  * in order to keep the core clean, we need a little hack here
  *
  * @param string $langId
  */
 protected function changeLanguage($langId)
 {
     if ($this->lastLanguage != $langId) {
         $_GET['language'] = $langId;
         Translate::reset();
         Translate::reloadLanguage($langId);
     }
     $this->lastLanguage = $langId;
 }
开发者ID:Abine,项目名称:piwik,代码行数:15,代码来源:IntegrationTestCase.php

示例2: testIsDefined

 public function testIsDefined()
 {
     // setup the access layer
     FakeAccess::$superUser = true;
     Translate::loadAllTranslations();
     Fixture::createWebsite('2009-01-04 00:11:42', true);
     $_GET['idSite'] = 1;
     WidgetsList::_reset();
     WidgetsList::add('Actions', 'Pages', 'Actions', 'getPageUrls');
     $this->assertTrue(WidgetsList::isDefined('Actions', 'getPageUrls'));
     $this->assertFalse(WidgetsList::isDefined('Actions', 'inValiD'));
     Translate::reset();
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:13,代码来源:WidgetsListTest.php

示例3: clearInMemoryCaches

 public function clearInMemoryCaches()
 {
     Archive::clearStaticCache();
     DataTableManager::getInstance()->deleteAll();
     Option::clearCache();
     Site::clearCache();
     Cache::deleteTrackerCache();
     PiwikCache::getTransientCache()->flushAll();
     PiwikCache::getEagerCache()->flushAll();
     PiwikCache::getLazyCache()->flushAll();
     ArchiveTableCreator::clear();
     \Piwik\Plugins\ScheduledReports\API::$cache = array();
     Singleton::clearAll();
     PluginsArchiver::$archivers = array();
     $_GET = $_REQUEST = array();
     Translate::reset();
     self::getConfig()->Plugins;
     // make sure Plugins exists in a config object for next tests that use Plugin\Manager
     // since Plugin\Manager uses getFromGlobalConfig which doesn't init the config object
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:20,代码来源:Fixture.php

示例4: test_getCategory_shouldReturnTranslatedCategory

 public function test_getCategory_shouldReturnTranslatedCategory()
 {
     Translate::loadAllTranslations();
     $this->assertEquals('Goals', $this->advancedReport->getCategory());
     Translate::reset();
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:6,代码来源:ReportTest.php

示例5: tearDown

 public function tearDown()
 {
     Translate::reset();
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:4,代码来源:SegmentFormatterTest.php

示例6: tearDown

 public function tearDown()
 {
     parent::tearDown();
     Translate::reset();
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:5,代码来源:ApiTest.php

示例7: tearDown

 public function tearDown()
 {
     Translate::reset();
     $this->unsetSiteManagerApiMock();
 }
开发者ID:ahdinosaur,项目名称:analytics.dinosaur.is,代码行数:5,代码来源:FormatterTest.php

示例8: testGetLocalizedTimeFormats

 /**
  * @group Core
  * @dataProvider getLocalizedLongStrings
  */
 public function testGetLocalizedTimeFormats($language, $use12HourClock, $time, $shouldBe)
 {
     Translate::loadAllTranslations();
     StaticContainer::get('Piwik\\Translation\\Translator')->setCurrentLanguage($language);
     StaticContainer::get('Piwik\\Intl\\Data\\Provider\\DateTimeFormatProvider')->forceTimeFormat($use12HourClock);
     $date = Date::factory($time);
     $this->assertEquals($shouldBe, $date->getLocalized(Date::TIME_FORMAT));
     Translate::reset();
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:13,代码来源:DateTest.php

示例9: tearDown

 public function tearDown()
 {
     StaticContainer::get('Piwik\\NumberFormatter')->unsetInstance();
     Translate::reset();
     $this->unsetSiteManagerApiMock();
 }
开发者ID:normimuc,项目名称:piwik,代码行数:6,代码来源:FormatterTest.php

示例10: tearDown

 protected function tearDown()
 {
     parent::tearDown();
     Translate::reset();
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:5,代码来源:ContentsTest.php

示例11: tearDown

 public function tearDown()
 {
     StaticContainer::get('Piwik\\NumberFormatter')->unsetInstance();
     Translate::reset();
 }
开发者ID:normimuc,项目名称:piwik,代码行数:5,代码来源:NumberFormatterTest.php

示例12: setUp

 public function setUp()
 {
     Translate::reset();
 }
开发者ID:ep123,项目名称:plugin-CustomDimensions,代码行数:4,代码来源:NameTest.php


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