public function fromObject($source_object)
 {
     /* @var $source_object CaptionAssetItem */
     $ret = parent::fromObject($source_object);
     $this->asset = new KalturaCaptionAsset();
     $this->asset->fromObject($source_object->getAsset());
     $entry = $source_object->getEntry();
     $this->entry = KalturaEntryFactory::getInstanceByType($entry->getType());
     $this->entry->fromObject($entry);
     return $ret;
 }
예제 #2
0
 public function fromObject($sourceObject)
 {
     if (!$sourceObject) {
         return;
     }
     parent::fromObject($sourceObject);
 }
예제 #3
0
 public function doFromObject($source_object, KalturaDetachedResponseProfile $responseProfile = null)
 {
     /* @var $source_object CaptionAssetItem */
     $ret = parent::doFromObject($source_object, $responseProfile);
     if ($this->shouldGet('asset', $responseProfile)) {
         $this->asset = new KalturaCaptionAsset();
         $this->asset->fromObject($source_object->getAsset());
     }
     if ($this->shouldGet('entry', $responseProfile)) {
         $entry = $source_object->getEntry();
         if ($entry) {
             $this->entry = KalturaEntryFactory::getInstanceByType($entry->getType());
             $this->entry->fromObject($entry);
         }
     }
     return $ret;
 }
예제 #4
0
 public function fromObject($dbDataEntry)
 {
     parent::fromObject($dbDataEntry);
     //$retrieveDataContentByGet = $dbDataEntry->getFromCustomData('retrieveDataContentByGet');
     $retrieveDataContentByGet = $dbDataEntry->getRetrieveDataContentByGet();
     $this->retrieveDataContentByGet = $retrieveDataContentByGet;
     if ($retrieveDataContentByGet != true) {
         $this->dataContent = '';
     }
 }
예제 #5
0
 public function fromObject($sourceObject)
 {
     if (!$sourceObject) {
         return;
     }
     parent::fromObject($sourceObject);
     $host = requestUtils::getHost();
     $this->executeUrl = myPlaylistUtils::toPlaylistUrl($sourceObject, $host);
     if ($this->playlistType == KalturaPlaylistType::DYNAMIC) {
         $this->playlistContentXmlToFilters();
     }
 }
 /**
  * Update the content resource associated with the entry.
  * 
  * @action updateContent
  * @param string $entryId Entry id to update
  * @param KalturaResource $resource Resource to be used to replace entry content
  * @param int $conversionProfileId The conversion profile id to be used on the entry
  * @return KalturaBaseEntry The updated entry
  * 
  * @throws KalturaErrors::ENTRY_ID_NOT_FOUND
  * @validateUser entry entryId edit
  */
 function updateContentAction($entryId, KalturaResource $resource, $conversionProfileId = null)
 {
     $dbEntry = entryPeer::retrieveByPK($entryId);
     if (!$dbEntry) {
         throw new KalturaAPIException(KalturaErrors::ENTRY_ID_NOT_FOUND, $entryId);
     }
     $baseEntry = new KalturaBaseEntry();
     $baseEntry->fromObject($dbEntry);
     switch ($dbEntry->getType()) {
         case entryType::MEDIA_CLIP:
             $service = new MediaService();
             $service->initService('media', 'media', $this->actionName);
             $service->replaceResource($resource, $dbEntry, $conversionProfileId);
             $baseEntry->fromObject($dbEntry);
             return $baseEntry;
         case entryType::MIX:
         case entryType::PLAYLIST:
         case entryType::DATA:
         case entryType::LIVE_STREAM:
         default:
             // TODO load from plugin manager other entry services such as document
             throw new KalturaAPIException(KalturaErrors::ENTRY_TYPE_NOT_SUPPORTED, $baseEntry->type);
     }
     return $baseEntry;
 }