getActiveReleaseChannel() public method

public getActiveReleaseChannel ( ) : ReleaseChannel
return Piwik\UpdateCheck\ReleaseChannel
コード例 #1
0
ファイル: ReleaseChannelsTest.php プロジェクト: JoeHorn/piwik
 /**
  * @dataProvider getTestActiveReleaseChannel
  */
 public function test_getActiveReleaseChannel_shouldReturnCorrectReleaseChannelForId($expectedId, $activeId)
 {
     $backupId = Config::getInstance()->General['release_channel'];
     $this->channels->setActiveReleaseChannelId($activeId);
     $this->assertSame($expectedId, $this->channels->getActiveReleaseChannel()->getId());
     $this->channels->setActiveReleaseChannelId($backupId);
 }
コード例 #2
0
ファイル: Updater.php プロジェクト: dorelljames/piwik
 /**
  * @param string $version
  * @param bool $https Whether to use HTTPS if supported of not. If false, will use HTTP.
  * @return string
  */
 public function getArchiveUrl($version, $https = true)
 {
     $channel = $this->releaseChannels->getActiveReleaseChannel();
     $url = $channel->getDownloadUrlWithoutScheme($version);
     if ($this->isUpdatingOverHttps() && $https) {
         $url = 'https' . $url;
     } else {
         $url = 'http' . $url;
     }
     return $url;
 }
コード例 #3
0
ファイル: Environment.php プロジェクト: piwik/piwik
 public function __construct(ReleaseChannels $releaseChannels)
 {
     $this->releaseChannel = $releaseChannels->getActiveReleaseChannel();
 }