本文整理匯總了PHP中KalturaClient::setClientTag方法的典型用法代碼示例。如果您正苦於以下問題:PHP KalturaClient::setClientTag方法的具體用法?PHP KalturaClient::setClientTag怎麽用?PHP KalturaClient::setClientTag使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類KalturaClient
的用法示例。
在下文中一共展示了KalturaClient::setClientTag方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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());
}