public function getRenderer($flavors)
 {
     if ($this->getManifestRedirect() && $this->getHostName() != $_SERVER['HTTP_HOST']) {
         return new kRedirectManifestRenderer($flavors, $this->params->getEntryId());
     }
     return parent::getRenderer($flavors);
 }
 public function serve()
 {
     if ($this->getManifestRedirect() && $this->getHostName() != $_SERVER['HTTP_HOST']) {
         kApiCache::setConditionalCacheExpiry(600);
         // the result contains a KS so we shouldn't cache it for a long time
         $parsedUrl = parse_url($this->getUrl());
         $flavor = array('urlPrefix' => $this->params->getMediaProtocol() . '://' . $parsedUrl['host'], 'url' => $_SERVER["REQUEST_URI"]);
         return new kRedirectManifestRenderer(array($flavor), $this->params->getEntryId());
     }
     return parent::serve();
 }
 protected function doGetFileSyncUrl(FileSync $fileSync)
 {
     $url = parent::doGetFileSyncUrl($fileSync);
     $url .= VodPackagerDeliveryUtils::getExtraParams($this->params);
     return $url . '/index.m3u8';
 }