public static function fromDbArray($arr) { $newArr = new KalturaAttachmentAssetArray(); if ($arr == null) { return $newArr; } foreach ($arr as $obj) { $nObj = new KalturaAttachmentAsset(); $nObj->fromObject($obj); $newArr[] = $nObj; } return $newArr; }
public static function fromDbArray($arr, KalturaDetachedResponseProfile $responseProfile = null) { $newArr = new KalturaAttachmentAssetArray(); if ($arr == null) { return $newArr; } foreach ($arr as $obj) { $nObj = new KalturaAttachmentAsset(); $nObj->fromObject($obj, $responseProfile); $newArr[] = $nObj; } return $newArr; }
/** * @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); } $attachmentAssets = new KalturaAttachmentAsset(); $attachmentAssets->fromObject($attachmentAssetsDb); return $attachmentAssets; }