当前位置: 首页>>代码示例>>PHP>>正文


PHP Kaltura_Client_Client::doMultiRequest方法代码示例

本文整理汇总了PHP中Kaltura_Client_Client::doMultiRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP Kaltura_Client_Client::doMultiRequest方法的具体用法?PHP Kaltura_Client_Client::doMultiRequest怎么用?PHP Kaltura_Client_Client::doMultiRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Kaltura_Client_Client的用法示例。


在下文中一共展示了Kaltura_Client_Client::doMultiRequest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testMultiRequest

 public function testMultiRequest()
 {
     $this->_client->startMultiRequest();
     $mixEntry = new Kaltura_Client_Type_MixEntry();
     $mixEntry->name = ".Net Mix";
     $mixEntry->editorType = Kaltura_Client_Enum_EditorType::SIMPLE;
     # Request 1
     $mixEntry = $this->_client->mixing->add($mixEntry);
     # Request 2
     $uploadFilePath = dirname(__FILE__) . '/../resources/' . self::UPLOAD_VIDEO_FILENAME;
     $uploadTokenId = $this->_client->media->upload($uploadFilePath);
     $mediaEntry = new Kaltura_Client_Type_MediaEntry();
     $mediaEntry->name = "Media Entry For Mix";
     $mediaEntry->mediaType = Kaltura_Client_Enum_MediaType::VIDEO;
     # Request 3
     $mediaEntry = $this->_client->media->addFromUploadedFile($mediaEntry, $uploadTokenId);
     # Request 4
     $this->_client->mixing->appendMediaEntry($mixEntry->id, $mediaEntry->id);
     $response = $this->_client->doMultiRequest();
     foreach ($response as $subResponse) {
         if ($subResponse instanceof Kaltura_Client_Exception) {
             throw new Exception("Error occurred: " . $subResponse->getMessage());
         }
     }
     # when accessing the response object we will use an index and not the response number (response number - 1)
     $this->assertTrue($response[0] instanceof Kaltura_Client_Type_MixEntry);
     $mixEntry = $response[0];
     if (is_null($mixEntry->id)) {
         throw new Exception("Failed to add entry within multi request");
     }
 }
开发者ID:wzur,项目名称:server,代码行数:31,代码来源:ZendClientTester.php


注:本文中的Kaltura_Client_Client::doMultiRequest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。