當前位置: 首頁>>代碼示例>>PHP>>正文


PHP KalturaClient::doMultiRequest方法代碼示例

本文整理匯總了PHP中KalturaClient::doMultiRequest方法的典型用法代碼示例。如果您正苦於以下問題:PHP KalturaClient::doMultiRequest方法的具體用法?PHP KalturaClient::doMultiRequest怎麽用?PHP KalturaClient::doMultiRequest使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在KalturaClient的用法示例。


在下文中一共展示了KalturaClient::doMultiRequest方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: KalturaMetadataFilter

//return only the relevant profile
$client->metadata->listAction($filter);
//since we're limiting to entry id and profile this will return at most 1 result
//Request #3: get the entry's payment metadata
$filter = new KalturaMetadataFilter();
$filter->metadataObjectTypeEqual = KalturaMetadataObjectType::CATEGORY;
//search for all category metadatas
$filter->objectIdIn = '{1:result:categoriesIds}';
//return metadata for all categories of the given entry (categories taken from result of request #1)
$filter->metadataProfileIdEqual = PAYPAL_CATEGORY_METADATA_PROFILE_ID;
//return only the relevant profile
$pager = new KalturaFilterPager();
$pager->pageSize = 500;
$pager->pageIndex = 1;
$client->metadata->listAction($filter, $pager);
$multiRequest = $client->doMultiRequest();
//Call the server with the bundeled requests
$metaResults = $multiRequest[1];
//get result of response #2 (payment metadata of the given entry)
$price = 0;
$currencyCode = 'USD';
$tax = 0;
$also = "";
//Checks to see if the individual video has a price and displays it
if ($metaResults->totalCount > 0) {
    $metaResult = $metaResults->objects[0];
    $xml = simplexml_load_string($metaResult->xml);
    $price = (double) $xml->Price;
    $currencyCode = (string) $xml->CurrencyCode;
    $tax = (double) $xml->TaxPercent;
    $also = 'also ';
開發者ID:nagyistoce,項目名稱:Kaltura-Paid-Content-Gallery-With-Stripe,代碼行數:31,代碼來源:payment.php


注:本文中的KalturaClient::doMultiRequest方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。