public function toInsertableObject($object_to_fill = null, $props_to_skip = array()) { if (is_null($object_to_fill)) { $object_to_fill = new AmazonS3StorageProfile(); } return parent::toInsertableObject($object_to_fill, $props_to_skip); }
/** * Adds a storage profile to the Kaltura DB. * * @action add * @param KalturaStorageProfile $storageProfile * @return KalturaStorageProfile */ function addAction(KalturaStorageProfile $storageProfile) { if (!$storageProfile->status) { $storageProfile->status = KalturaStorageProfileStatus::DISABLED; } $dbStorageProfile = $storageProfile->toInsertableObject(); $dbStorageProfile->setPartnerId($this->impersonatedPartnerId); $dbStorageProfile->save(); $storageProfile->fromObject($dbStorageProfile); return $storageProfile; }
/** * Adds a storage profile to the Kaltura DB. * * @action add * @param KalturaStorageProfile $storageProfile * @return KalturaStorageProfile */ function addAction(KalturaStorageProfile $storageProfile) { if (!$storageProfile->status) { $storageProfile->status = KalturaStorageProfileStatus::DISABLED; } $dbStorageProfile = $storageProfile->toInsertableObject(); /* @var $dbStorageProfile StorageProfile */ $dbStorageProfile->setPartnerId($this->impersonatedPartnerId); $dbStorageProfile->save(); $storageProfile = KalturaStorageProfile::getInstanceByType($dbStorageProfile->getProtocol()); $storageProfile->fromObject($dbStorageProfile, $this->getResponseProfile()); return $storageProfile; }