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


PHP KalturaClient::setPartnerId方法代码示例

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


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

示例1: __construct

 /**
  * @param KSchedularTaskConfig $taskConfig
  */
 public function __construct($taskConfig = null)
 {
     /*
      *  argv[0] - the script name
      *  argv[1] - serialized KSchedulerConfig config
      */
     global $argv, $g_context;
     $this->sessionKey = uniqid('sess');
     $this->start = microtime(true);
     if (is_null($taskConfig)) {
         $data = gzuncompress(base64_decode($argv[1]));
         self::$taskConfig = unserialize($data);
     } else {
         self::$taskConfig = $taskConfig;
     }
     if (!self::$taskConfig) {
         die("Task config not supplied");
     }
     date_default_timezone_set(self::$taskConfig->getTimezone());
     // clear seperator between executions
     KalturaLog::debug('___________________________________________________________________________________');
     KalturaLog::stderr('___________________________________________________________________________________', KalturaLog::DEBUG);
     KalturaLog::info(file_get_contents(dirname(__FILE__) . "/../VERSION.txt"));
     if (!self::$taskConfig instanceof KSchedularTaskConfig) {
         KalturaLog::err('config is not a KSchedularTaskConfig');
         die;
     }
     KalturaLog::debug("set_time_limit({" . self::$taskConfig->maximumExecutionTime . "})");
     set_time_limit(self::$taskConfig->maximumExecutionTime);
     KalturaLog::debug('This batch index: ' . $this->getIndex());
     KalturaLog::debug('This session key: ' . $this->sessionKey);
     self::$kClientConfig = new KalturaConfiguration();
     self::$kClientConfig->setLogger($this);
     self::$kClientConfig->serviceUrl = self::$taskConfig->getServiceUrl();
     self::$kClientConfig->curlTimeout = self::$taskConfig->getCurlTimeout();
     if (isset(self::$taskConfig->clientConfig)) {
         foreach (self::$taskConfig->clientConfig as $attr => $value) {
             self::$kClientConfig->{$attr} = $value;
         }
     }
     self::$kClient = new KalturaClient(self::$kClientConfig);
     self::$kClient->setPartnerId(self::$taskConfig->getPartnerId());
     self::$clientTag = 'batch: ' . self::$taskConfig->getSchedulerName() . ' ' . get_class($this) . " index: {$this->getIndex()} sessionId: " . UniqueId::get();
     self::$kClient->setClientTag(self::$clientTag);
     //$ks = self::$kClient->session->start($secret, "user-2", KalturaSessionType::ADMIN);
     $ks = $this->createKS();
     self::$kClient->setKs($ks);
     KDwhClient::setEnabled(self::$taskConfig->getDwhEnabled());
     KDwhClient::setFileName(self::$taskConfig->getDwhPath());
     $this->onBatchUp();
     KScheduleHelperManager::saveRunningBatch($this->getName(), $this->getIndex());
 }
开发者ID:kubrickfr,项目名称:server,代码行数:55,代码来源:KBatchBase.class.php

示例2: dirname

$secret = $argv[3];
$profile_name = $argv[4];
$delivery_url = $argv[5];
$storage_host = $argv[6];
$storage_basedir = $argv[7];
$storage_user = $argv[8];
$storage_passwd = $argv[9];
$basedir = dirname(__FILE__);
$storage_protocol = $argv[10];
$playback_protocol = $argv[11];
try {
    $config = new KalturaConfiguration($partnerId);
    $config->serviceUrl = $service_url;
    $client = new KalturaClient($config);
    $config->partnerId = $partnerId;
    $client->setPartnerId($partnerId);
    $ks = $client->session->start($secret, null, KalturaSessionType::ADMIN, -2, null, null);
    $client->setKs($ks);
    $delivery = new KalturaDeliveryProfile();
    $delivery->name = $profile_name;
    $delivery->status = KalturaDeliveryStatus::ACTIVE;
    $delivery->type = KalturaDeliveryProfileType::HTTP;
    $delivery->streamerType = KalturaPlaybackProtocol::HTTP;
    $delivery->systemName = $profile_name;
    $delivery->url = $delivery_url;
    //$delivery->isDefault = KalturaNullableBoolean::FALSE_VALUE;
    $delivery_obj = $client->deliveryProfile->add($delivery);
    if ($protocols[$storage_protocol] === 'S3') {
        $storageProfile = new KalturaAmazonS3StorageProfile();
        $storageProfile->filesPermissionInS3 = KalturaAmazonS3StorageProfileFilesPermissionLevel::ACL_PUBLIC_READ;
    } else {
开发者ID:GeraldNathan,项目名称:platform-install-packages,代码行数:31,代码来源:create_remote_storage.php

示例3: basename

writeLog($logPrefix, 'Service URL ' . $serviceUrl);
$sleepSec = $config['sleep_time'];
$fileName = basename($filePath);
$folderPath = dirname($filePath);
writeLog($logPrefix, '---------------------------- Start handling --------------------------');
writeLog($logPrefix, 'action:' . $action);
writeLog($logPrefix, 'file path:' . $filePath);
writeLog($logPrefix, 'folder path:' . $folderPath);
writeLog($logPrefix, 'file name:' . $fileName);
writeLog($logPrefix, 'file size:' . $fileSize);
$kClientConfig = new KalturaConfiguration();
$kClientConfig->serviceUrl = $serviceUrl;
$kClientConfig->curlTimeout = 180;
$kClientConfig->setLogger(new SyncDropFolderWatcherLogger($logPrefix));
$kClient = new KalturaClient($kClientConfig);
$kClient->setPartnerId(-1);
$dropFolderPlugin = KalturaDropFolderClientPlugin::get($kClient);
try {
    $folder = null;
    $filter = new KalturaDropFolderFilter();
    $filter->pathEqual = $folderPath;
    $filter->typeEqual = KalturaDropFolderType::LOCAL;
    $filter->statusIn = KalturaDropFolderStatus::ENABLED . ',' . KalturaDropFolderStatus::ERROR;
    $dropFolders = $dropFolderPlugin->dropFolder->listAction($filter);
    writeLog($logPrefix, 'found ' . $dropFolders->totalCount . ' folders');
    if ($dropFolders->totalCount == 1) {
        $folder = $dropFolders->objects[0];
        writeLog($logPrefix, 'drop folder id ' . $folder->id);
        $ignorePatterns = array_map('trim', explode(',', $folder->ignoreFileNamePatterns));
        foreach ($ignorePatterns as $ignorePattern) {
            if (!is_null($ignorePattern) && $ignorePattern != '' && fnmatch($ignorePattern, $fileName)) {
开发者ID:wzur,项目名称:server,代码行数:31,代码来源:SyncDropFolderWatcher.php


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