コード例 #1
0
 public function toObject($object_to_fill = null, $props_to_skip = array())
 {
     if (!$object_to_fill) {
         $object_to_fill = new AttachmentAsset();
     }
     return parent::toObject($object_to_fill, $props_to_skip);
 }
 public function toInsertableObject($object_to_fill = null, $props_to_skip = array())
 {
     if (!is_null($this->thumbParamsId)) {
         $dbAssetParams = assetParamsPeer::retrieveByPK($this->thumbParamsId);
         if ($dbAssetParams) {
             $object_to_fill->setFromAssetParams($dbAssetParams);
         }
     }
     return parent::toInsertableObject($object_to_fill, $props_to_skip);
 }
コード例 #3
0
 public static function fromDbArray($arr, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $newArr = new KalturaAttachmentAssetArray();
     if ($arr == null) {
         return $newArr;
     }
     foreach ($arr as $obj) {
         $nObj = KalturaAsset::getInstance($obj);
         $nObj->fromObject($obj, $responseProfile);
         $newArr[] = $nObj;
     }
     return $newArr;
 }
コード例 #4
0
 public function getMapBetweenObjects()
 {
     return array_merge(parent::getMapBetweenObjects(), self::$map_between_objects);
 }
コード例 #5
0
 /**
  * @action get
  * @param string $attachmentAssetId
  * @return KalturaAttachmentAsset
  * 
  * @throws KalturaAttachmentErrors::ATTACHMENT_ASSET_ID_NOT_FOUND
  */
 public function getAction($attachmentAssetId)
 {
     $attachmentAssetsDb = assetPeer::retrieveById($attachmentAssetId);
     if (!$attachmentAssetsDb || !$attachmentAssetsDb instanceof AttachmentAsset) {
         throw new KalturaAPIException(KalturaAttachmentErrors::ATTACHMENT_ASSET_ID_NOT_FOUND, $attachmentAssetId);
     }
     $attachmentAsset = KalturaAsset::getInstance($attachmentAssetsDb);
     $attachmentAsset->fromObject($attachmentAssetsDb, $this->getResponseProfile());
     return $attachmentAsset;
 }
コード例 #6
0
 public function validateForInsert($propertiesToSkip = array())
 {
     if ($this->format == KalturaCaptionType::WEBVTT) {
         throw new KalturaAPIException(KalturaCaptionErrors::CAPTION_ASSET_UNSUPPORTED_FORMAT, $this->format);
     }
     parent::validateForInsert($propertiesToSkip);
 }
 public function toInsertableObject($object_to_fill = null, $props_to_skip = array())
 {
     if (!is_null($this->captionParamsId)) {
         $dbAssetParams = assetParamsPeer::retrieveByPK($this->captionParamsId);
         if ($dbAssetParams) {
             $object_to_fill->setFromAssetParams($dbAssetParams);
         }
     }
     if ($this->format === null && $object_to_fill->getContainerFormat() === null) {
         $this->format = KalturaCaptionType::SRT;
     }
     return parent::toInsertableObject($object_to_fill, $props_to_skip);
 }