/**
  * @param $syndicatioFeed
  */
 public static function getXslt(syndicationFeed $syndicationFeed)
 {
     if (self::$xsl) {
         return self::$xsl;
     }
     self::$xsl = $syndicationFeed->getXslt();
     return self::$xsl;
 }
 /**
  * @param SyndicationDistributionProfile $object_to_fill
  * @param array $props_to_skip
  * @return SyndicationDistributionProfile
  */
 public function toUpdatableObject($object_to_fill, $props_to_skip = array())
 {
     if (is_null($object_to_fill)) {
         $object_to_fill = new SyndicationDistributionProfile();
     }
     kSyndicationFeedManager::validateXsl($this->xsl);
     return parent::toUpdatableObject($object_to_fill, $props_to_skip);
 }
 /**
  * @param SyndicationDistributionProfile $object_to_fill
  * @param array $props_to_skip
  * @return genericSyndicationFeed
  */
 public function toUpdatableObject($object_to_fill, $props_to_skip = array())
 {
     if (is_null($object_to_fill)) {
         $object_to_fill = new genericSyndicationFeed();
     }
     if ($this->xslt) {
         kSyndicationFeedManager::validateXsl($this->xslt);
     }
     return parent::toUpdatableObject($object_to_fill, $props_to_skip);
 }
 private function renderKalturaFeed($state, $entry = null, $e = null, $moreItems = false)
 {
     switch ($state) {
         case self::STATE_HEADER:
             header("content-type: text/xml; charset=utf-8");
             echo kSyndicationFeedManager::getMrssHeader($this->syndicationFeed->name, $this->syndicationFeed->feedLandingPage, $this->syndicationFeed->feedDescription, $this->syndicationFeedDB);
             break;
         case self::STATE_BODY:
             //syndication parameters to pass to XSLT
             $xslParams = array();
             $xslParams[XsltParameterName::KALTURA_HAS_NEXT_ITEM] = $moreItems;
             $xslParams[XsltParameterName::KALTURA_SYNDICATION_FEED_FLAVOR_PARAM_ID] = $this->syndicationFeedDB->getFlavorParamId();
             echo kSyndicationFeedManager::getMrssEntry($entry, $this->syndicationFeedDB, $this->syndicationFeed->landingPage, $xslParams);
             break;
         case self::STATE_FOOTER:
             echo kSyndicationFeedManager::getMrssFooter($this->syndicationFeed->name, $this->syndicationFeed->feedLandingPage, $this->syndicationFeed->feedDescription, $this->syndicationFeedDB);
             break;
     }
 }
 private function renderKalturaFeed()
 {
     $syndicationFeedDB = syndicationFeedPeer::retrieveByPK($this->syndicationFeed->id);
     if (!$syndicationFeedDB) {
         throw new Exception("Feed Id not found");
     }
     //header xml
     echo kSyndicationFeedManager::getMrssHeader($this->syndicationFeed->name, $this->syndicationFeed->feedLandingPage, $this->syndicationFeed->feedDescription, $syndicationFeedDB);
     //items
     while ($entry = $this->getNextEntry()) {
         // in case no video player is requested by user and the entry is mix, skip it
         if ($entry->getType() === entryType::MIX && !$this->syndicationFeed->allowEmbed) {
             continue;
         }
         echo kSyndicationFeedManager::getMrssEntry($entry, $syndicationFeedDB, $this->syndicationFeed->landingPage);
     }
     echo kSyndicationFeedManager::getMrssFooter($this->syndicationFeed->name, $this->syndicationFeed->feedLandingPage, $this->syndicationFeed->feedDescription, $syndicationFeedDB);
 }