コード例 #1
0
ファイル: AdCuePointPlugin.php プロジェクト: DBezemer/server
 public static function syndicate(CuePoint $cuePoint, SimpleXMLElement $scenes, SimpleXMLElement $scene = null)
 {
     if (!$cuePoint instanceof AdCuePoint) {
         return $scene;
     }
     if (!$scene) {
         $scene = kCuePointManager::syndicateCuePointXml($cuePoint, $scenes->addChild('scene-ad-cue-point'));
     }
     if ($cuePoint->getEndTime()) {
         $scene->addChild('sceneEndTime', kXml::integerToTime($cuePoint->getEndTime()));
     }
     if ($cuePoint->getName()) {
         $scene->addChild('sceneTitle', kMrssManager::stringToSafeXml($cuePoint->getName()));
     }
     if ($cuePoint->getSourceUrl()) {
         $scene->addChild('sourceUrl', htmlspecialchars($cuePoint->getSourceUrl()));
     }
     $scene->addChild('adType', $cuePoint->getAdType());
     $scene->addChild('protocolType', $cuePoint->getSubType());
     return $scene;
 }
コード例 #2
0
 public static function syndicate(CuePoint $cuePoint, SimpleXMLElement $scenes, SimpleXMLElement $scene = null)
 {
     if (!$cuePoint instanceof ThumbCuePoint) {
         return $scene;
     }
     if (!$scene) {
         $scene = kCuePointManager::syndicateCuePointXml($cuePoint, $scenes->addChild('scene-thumb-cue-point'));
     }
     if ($cuePoint->getEndTime()) {
         $scene->addChild('sceneEndTime', kXml::integerToTime($cuePoint->getEndTime()));
     }
     $scene->addChild('thumbAssetId', $cuePoint->getAssetId());
     return $scene;
 }
 public static function syndicate(CuePoint $cuePoint, SimpleXMLElement $scenes, SimpleXMLElement $scene = null)
 {
     if (!$cuePoint instanceof Annotation) {
         return $scene;
     }
     if (!$scene) {
         $scene = kCuePointManager::syndicateCuePointXml($cuePoint, $scenes->addChild('scene-annotation'));
     }
     $scene->addChild('sceneEndTime', kXml::integerToTime($cuePoint->getEndTime()));
     if ($cuePoint->getText()) {
         $scene->addChild('sceneText', kMrssManager::stringToSafeXml($cuePoint->getText()));
     }
     if ($cuePoint->getParentId()) {
         $parentCuePoint = CuePointPeer::retrieveByPK($cuePoint->getParentId());
         if ($parentCuePoint) {
             if ($parentCuePoint->getSystemName()) {
                 $scene->addChild('parent', kMrssManager::stringToSafeXml($parentCuePoint->getSystemName()));
             }
             $scene->addChild('parentId', $parentCuePoint->getId());
         }
     }
     return $scene;
 }
コード例 #4
0
ファイル: CuePointService.php プロジェクト: DBezemer/server
 /**
  * Download multiple cue points objects as XML definitions
  * 
  * @action serveBulk
  * @param KalturaCuePointFilter $filter
  * @param KalturaFilterPager $pager
  * @return file
  */
 function serveBulkAction(KalturaCuePointFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaCuePointFilter();
     }
     $c = KalturaCriteria::create(CuePointPeer::OM_CLASS);
     if ($this->getCuePointType()) {
         $c->add(CuePointPeer::TYPE, $this->getCuePointType());
     }
     $cuePointFilter = $filter->toObject();
     $cuePointFilter->attachToCriteria($c);
     if ($pager) {
         $pager->attachToCriteria($c);
     }
     $list = CuePointPeer::doSelect($c);
     $xml = kCuePointManager::generateXml($list);
     header("Content-Type: text/xml; charset=UTF-8");
     echo $xml;
     kFile::closeDbConnections();
     exit(0);
 }
コード例 #5
0
ファイル: CodeCuePointPlugin.php プロジェクト: wzur/server
 public static function syndicate(CuePoint $cuePoint, SimpleXMLElement $scenes, SimpleXMLElement $scene = null)
 {
     if (!$cuePoint instanceof CodeCuePoint) {
         return $scene;
     }
     if (!$scene) {
         $scene = kCuePointManager::syndicateCuePointXml($cuePoint, $scenes->addChild('scene-code-cue-point'));
     }
     if ($cuePoint->getEndTime()) {
         $scene->addChild('sceneEndTime', kXml::integerToTime($cuePoint->getEndTime()));
     }
     $scene->addChild('code', kMrssManager::stringToSafeXml($cuePoint->getName()));
     if ($cuePoint->getText()) {
         $scene->addChild('description', kMrssManager::stringToSafeXml($cuePoint->getText()));
     }
     return $scene;
 }
 public function contribute(BaseObject $object, SimpleXMLElement $mrss, kMrssParameters $mrssParams = null)
 {
     if (!$object instanceof entry) {
         return;
     }
     $cuePoints = CuePointPeer::retrieveByEntryId($object->getId());
     if (!count($cuePoints)) {
         return;
     }
     $scenes = $mrss->addChild('scenes');
     kCuePointManager::syndicate($cuePoints, $scenes);
 }