当前位置: 首页>>代码示例>>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;未经允许,请勿转载。