示例#1
0
 public static function fromDbArray($arr, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $newArr = new KalturaCuePointArray();
     if ($arr == null) {
         return $newArr;
     }
     foreach ($arr as $obj) {
         $nObj = KalturaCuePoint::getInstance($obj, $responseProfile);
         $newArr[] = $nObj;
     }
     return $newArr;
 }
 public static function fromDbArray($arr)
 {
     $newArr = new KalturaCuePointArray();
     if ($arr == null) {
         return $newArr;
     }
     foreach ($arr as $obj) {
         $nObj = KalturaCuePoint::getInstance($obj->getType());
         $nObj->fromObject($obj);
         $newArr[] = $nObj;
     }
     return $newArr;
 }
示例#3
0
 /**
  * Retrieve an CuePoint object by id
  * 
  * @action get
  * @param string $id 
  * @return KalturaCuePoint
  * @throws KalturaCuePointErrors::INVALID_CUE_POINT_ID
  */
 function getAction($id)
 {
     $dbCuePoint = CuePointPeer::retrieveByPK($id);
     if (!$dbCuePoint) {
         throw new KalturaAPIException(KalturaCuePointErrors::INVALID_CUE_POINT_ID, $id);
     }
     if ($this->getCuePointType() && $dbCuePoint->getType() != $this->getCuePointType()) {
         throw new KalturaAPIException(KalturaCuePointErrors::INVALID_CUE_POINT_ID, $id);
     }
     $cuePoint = KalturaCuePoint::getInstance($dbCuePoint, $this->getResponseProfile());
     if (!$cuePoint) {
         return null;
     }
     return $cuePoint;
 }