Exemplo n.º 1
0
 public static function parseXml(SimpleXMLElement $scene, $partnerId, CuePoint $cuePoint = null)
 {
     if ($scene->getName() != 'scene-ad-cue-point') {
         return $cuePoint;
     }
     if (!$cuePoint) {
         $cuePoint = kCuePointManager::parseXml($scene, $partnerId, new AdCuePoint());
     }
     if (!$cuePoint instanceof AdCuePoint) {
         return null;
     }
     if (isset($scene->sceneEndTime)) {
         $cuePoint->setEndTime(kXml::timeToInteger($scene->sceneEndTime));
     }
     if (isset($scene->sceneTitle)) {
         $cuePoint->setName($scene->sceneTitle);
     }
     if (isset($scene->sourceUrl)) {
         $cuePoint->setSourceUrl($scene->sourceUrl);
     }
     $cuePoint->setAdType($scene->adType);
     $cuePoint->setSubType($scene->protocolType);
     return $cuePoint;
 }
 public static function parseXml(SimpleXMLElement $scene, $partnerId, CuePoint $cuePoint = null)
 {
     if ($scene->getName() != 'scene-annotation') {
         return $cuePoint;
     }
     if (!$cuePoint) {
         $cuePoint = kCuePointManager::parseXml($scene, $partnerId, new Annotation());
     }
     if (!$cuePoint instanceof Annotation) {
         return null;
     }
     $cuePoint->setEndTime(kXml::timeToInteger($scene->sceneEndTime));
     if (isset($scene->sceneText)) {
         $cuePoint->setText($scene->sceneText);
     }
     $parentCuePoint = null;
     if (isset($scene->parentId)) {
         $parentCuePoint = CuePointPeer::retrieveByPK($scene->parentId);
     } elseif (isset($scene->parent)) {
         $parentCuePoint = CuePointPeer::retrieveBySystemName($cuePoint->getEntryId(), $scene->parent);
     }
     if ($parentCuePoint) {
         $cuePoint->setParentId($parentCuePoint->getId());
     }
     return $cuePoint;
 }
Exemplo n.º 3
0
 public static function parseXml(SimpleXMLElement $scene, $partnerId, CuePoint $cuePoint = null)
 {
     if ($scene->getName() != 'scene-thumb-cue-point') {
         return $cuePoint;
     }
     if (!$cuePoint) {
         $cuePoint = kCuePointManager::parseXml($scene, $partnerId, new ThumbCuePoint());
     }
     if (!$cuePoint instanceof ThumbCuePoint) {
         return null;
     }
     return $cuePoint;
 }
Exemplo n.º 4
0
 public static function parseXml(SimpleXMLElement $scene, $partnerId, CuePoint $cuePoint = null)
 {
     if ($scene->getName() != 'scene-code-cue-point') {
         return $cuePoint;
     }
     if (!$cuePoint) {
         $cuePoint = kCuePointManager::parseXml($scene, $partnerId, new CodeCuePoint());
     }
     if (!$cuePoint instanceof CodeCuePoint) {
         return null;
     }
     if (isset($scene->sceneEndTime)) {
         $cuePoint->setEndTime(kXml::timeToInteger($scene->sceneEndTime));
     }
     if (isset($scene->code)) {
         $cuePoint->setName($scene->code);
     }
     if (isset($scene->description)) {
         $cuePoint->setText($scene->description);
     }
     return $cuePoint;
 }