public function fromObject($sourceObject)
 {
     parent::fromObject($sourceObject);
     $this->mediaFiles = KalturaDistributionRemoteMediaFileArray::fromDbArray($sourceObject->getMediaFiles());
     if (!$this->distributionProfileId) {
         return;
     }
     if (!$this->entryDistributionId) {
         return;
     }
     $distributionProfile = DistributionProfilePeer::retrieveByPK($this->distributionProfileId);
     if (!$distributionProfile || $distributionProfile->getStatus() != DistributionProfileStatus::ENABLED) {
         return;
     }
     $this->distributionProfile = KalturaDistributionProfileFactory::createKalturaDistributionProfile($distributionProfile->getProviderType());
     $this->distributionProfile->fromObject($distributionProfile);
     $entryDistribution = EntryDistributionPeer::retrieveByPK($this->entryDistributionId);
     if ($entryDistribution) {
         $this->entryDistribution = new KalturaEntryDistribution();
         $this->entryDistribution->fromObject($entryDistribution);
     }
     $providerType = $sourceObject->getProviderType();
     if ($providerType) {
         if ($providerType == KalturaDistributionProviderType::GENERIC) {
             $this->providerData = new KalturaGenericDistributionJobProviderData($this);
         } else {
             $this->providerData = KalturaPluginManager::loadObject('KalturaDistributionJobProviderData', $providerType, array($this));
         }
         $providerData = $sourceObject->getProviderData();
         if ($this->providerData && $providerData && $providerData instanceof kDistributionJobProviderData) {
             $this->providerData->fromObject($providerData);
         }
     }
 }
 public function fromObject($object)
 {
     parent::fromObject($object);
     $videoAssetFilePaths = $object->getVideoAssetFilePaths();
     if ($videoAssetFilePaths && is_array($videoAssetFilePaths)) {
         $this->videoAssetFilePaths = new KalturaFreewheelDistributionAssetPathArray();
         foreach ($videoAssetFilePaths as $assetFilePath) {
             $videoAssetFilePath = new KalturaFreewheelDistributionAssetPath();
             $videoAssetFilePath->path = $assetFilePath;
             $this->videoAssetFilePaths[] = $videoAssetFilePath;
         }
     }
 }