• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP myPartnerUtils类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: execute

 /**
  * Will forward to the uploader swf according to the ui_conf_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND, "UI conf not found");
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     $host = requestUtils::getRequestHost();
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         KExternalErrors::dieError(KExternalErrors::ILLEGAL_UI_CONF, "SWF URL not found in UI conf");
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     $conf_vars = $uiConf->getConfVars();
     if ($conf_vars) {
         $conf_vars = "&" . $conf_vars;
     }
     $params = "host=" . $host . "&uiConfId=" . $ui_conf_id . $conf_vars;
     KExternalErrors::terminateDispatch();
     $this->redirect("{$swf_url}?{$params}");
 }
开发者ID:DBezemer,项目名称:server,代码行数:34,代码来源:kuploadAction.class.php


示例2: initService

 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     myPartnerUtils::addPartnerToCriteria(new UserRolePeer(), $this->getPartnerId(), $this->private_partner_data, $this->partnerGroup());
     myPartnerUtils::addPartnerToCriteria(new PermissionPeer(), $this->getPartnerId(), $this->private_partner_data, $this->partnerGroup());
     myPartnerUtils::addPartnerToCriteria(new PermissionItemPeer(), $this->getPartnerId(), $this->private_partner_data, $this->partnerGroup());
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:7,代码来源:UserRoleService.php


示例3: execute

 /**
  * Will forward to the uploader swf according to the ui_conf_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         die;
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     $host = requestUtils::getRequestHost();
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         die;
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     $conf_vars = $uiConf->getConfVars();
     if ($conf_vars) {
         $conf_vars = "&" . $conf_vars;
     }
     $params = "host=" . $host . "&uiConfId=" . $ui_conf_id . $conf_vars;
     $this->redirect("{$swf_url}?{$params}");
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:33,代码来源:kuploadAction.class.php


示例4: execute

 public function execute()
 {
     $this->forceSystemAuthentication();
     $partner_id = $this->getRequestParameter('partner_id', -1);
     if ($partner_id >= 0) {
         myPartnerUtils::applyPartnerFilters($partner_id);
     }
     $this->partner_id = $partner_id;
     $order = $this->getRequestParameter('sort', kuser::KUSER_SORT_MOST_VIEWED);
     $page = $this->getRequestParameter('page', 1);
     $pager = kuserPeer::getAllUsersOrderedPager($order, 10, $page);
     $kuser_list = $pager->getResults();
     dashboardUtils::updateKusersRoughcutCount($kuser_list);
     $kusersData = array();
     foreach ($kuser_list as $kuser) {
         $kusersData[] = $this->createkuserData($kuser, $order);
     }
     // following variables will be used by the view
     $this->firstTime = $this->getRequestParameter('first', 1) == 1;
     $this->order = $order;
     $this->page = $page;
     $this->lastPage = $pager->getLastPage();
     $this->numResults = $pager->getNbResults();
     $this->kusersData = $kusersData;
     // allow the action buttons to show only for entires the user on their own pages
     $this->allowactions = true;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:27,代码来源:viewUsersAction.class.php


示例5: getFlavorAssetUrl

 /**
  * @param flavorAsset $flavorAsset
  * @return string
  */
 public function getFlavorAssetUrl(flavorAsset $flavorAsset)
 {
     $entry = $flavorAsset->getentry();
     $partnerId = $entry->getPartnerId();
     $subpId = $entry->getSubpId();
     $flavorAssetId = $flavorAsset->getId();
     $partnerPath = myPartnerUtils::getUrlForPartner($partnerId, $subpId);
     $this->setFileExtension($flavorAsset->getFileExt());
     $url = "/s{$partnerPath}/serveFlavor/flavorId/{$flavorAssetId}";
     if ($this->clipTo) {
         $url .= "/clipTo/{$this->clipTo}";
     }
     if ($this->extention) {
         $url .= "/name/{$flavorAssetId}.{$this->extention}";
     }
     $url = str_replace('\\', '/', $url);
     if ($this->protocol != StorageProfile::PLAY_FORMAT_RTMP) {
         $url .= '?novar=0';
         $url .= '&e=' . (time() + 120);
         $secret = $this->getMediaVault();
         $fullUrl = $this->protocol . '://' . $this->domain . $url;
         $url .= '&h=' . md5($secret . $fullUrl);
         $syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
         $seekFromBytes = $this->getSeekFromBytes(kFileSyncUtils::getLocalFilePathForKey($syncKey));
         if ($seekFromBytes) {
             $url .= '&fs=' . $seekFromBytes;
         }
     } else {
         $url .= '/forceproxy/true';
     }
     return $url;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:36,代码来源:kLimeLightUrlManager.php


示例6: execute

 /**
  * Will forward to the regular swf player according to the widget_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         die;
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     if (!$subp_id) {
         $subp_id = 0;
     }
     $host = myPartnerUtils::getHost($partner_id);
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         $ui_conf_swf_url = "/swf/ContributionWizard.swf";
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     $params = "contentUrl=" . urlencode($swf_url) . "&host=" . str_replace("http://", "", str_replace("https://", "", $host)) . "&cdnHost=" . str_replace("http://", "", str_replace("https://", "", myPartnerUtils::getCdnHost($partner_id))) . "&uiConfId=" . $ui_conf_id;
     $wrapper_swf = myContentStorage::getFSFlashRootPath() . "/flexwrapper/" . kConf::get('kcw_flex_wrapper_version') . "/FlexWrapper.swf";
     $this->redirect($host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . "{$wrapper_swf}?{$params}");
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:33,代码来源:kcwAction.class.php


示例7: purgeAssetFromEdgeCast

 private static function purgeAssetFromEdgeCast(asset $asset)
 {
     // get partner
     $partnerId = $asset->getPartnerId();
     $partner = PartnerPeer::retrieveByPK($partnerId);
     if (!$partner) {
         KalturaLog::err('Cannot find partner with id [' . $partnerId . ']');
         return false;
     }
     $mediaType = $asset instanceof thumbAsset ? self::EDGE_SERVICE_HTTP_SMALL_OBJECT_MEDIA_TYPE : self::EDGE_SERVICE_HTTP_LARGE_OBJECT_MEDIA_TYPE;
     $mediaTypePathList = array();
     try {
         $mediaTypePathList[] = array('MediaType' => $mediaType, 'MediaPath' => $asset->getDownloadUrl());
         // asset download url
     } catch (Exception $e) {
         KalturaLog::err('Cannot get asset URL for asset id [' . $asset->getId() . '] - ' . $e->getMessage());
     }
     if ($asset instanceof flavorAsset) {
         // get a list of all URLs leading to the asset for purging
         $subPartnerId = $asset->getentry()->getSubpId();
         $partnerPath = myPartnerUtils::getUrlForPartner($partnerId, $subPartnerId);
         $assetId = $asset->getId();
         $serveFlavorUrl = "{$partnerPath}/serveFlavor/entryId/" . $asset->getEntryId() . "/flavorId/{$assetId}" . '*';
         // * wildcard should delete all serveFlavor urls
         $hosts = array($partner->getCdnHost(), $partner->getRtmpUrl(), $partner->getIisHost());
         foreach ($hosts as $host) {
             if (!empty($host)) {
                 $mediaTypePathList[] = array('MediaType' => $mediaType, 'MediaPath' => $host . $serveFlavorUrl);
             }
         }
     }
     return self::purgeFromEdgeCast($mediaTypePathList, $partner);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:33,代码来源:kEdgeCastFlowManager.php


示例8: copyEventNotificationTemplates

 /**
  * @param Partner $fromPartner
  * @param Partner $toPartner
  */
 protected function copyEventNotificationTemplates(Partner $fromPartner, Partner $toPartner, $permissionRequiredOnly = false)
 {
     $fromPartnerId = $fromPartner->getId();
     $toPartnerId = $toPartner->getId();
     KalturaLog::debug("Copy event-notification templates from [{$fromPartnerId}] to [{$toPartnerId}]");
     $c = new Criteria();
     $c->add(EventNotificationTemplatePeer::PARTNER_ID, $fromPartnerId);
     $systemNameCriteria = new Criteria();
     $systemNameCriteria->add(EventNotificationTemplatePeer::PARTNER_ID, $toPartnerId);
     $systemNameCriteria->add(EventNotificationTemplatePeer::STATUS, EventNotificationTemplateStatus::ACTIVE);
     $eventNotificationTemplates = EventNotificationTemplatePeer::doSelect($c);
     foreach ($eventNotificationTemplates as $eventNotificationTemplate) {
         /* @var $eventNotificationTemplate EventNotificationTemplate */
         if ($permissionRequiredOnly && !count($eventNotificationTemplate->getRequiredCopyTemplatePermissions())) {
             continue;
         }
         if (!myPartnerUtils::isPartnerPermittedForCopy($toPartner, $eventNotificationTemplate->getRequiredCopyTemplatePermissions())) {
             continue;
         }
         if ($eventNotificationTemplate->getSystemName()) {
             $c = clone $systemNameCriteria;
             $c->add(EventNotificationTemplatePeer::SYSTEM_NAME, $eventNotificationTemplate->getSystemName());
             if (EventNotificationTemplatePeer::doCount($c)) {
                 continue;
             }
         }
         $newEventNotificationTemplate = $eventNotificationTemplate->copy();
         $newEventNotificationTemplate->setPartnerId($toPartnerId);
         $newEventNotificationTemplate->save();
     }
 }
开发者ID:kubrickfr,项目名称:server,代码行数:35,代码来源:kEventNotificationObjectCopiedHandler.php


示例9: getClientNotificationAction

 /**
  * Return the notifications for a specific entry id and type
  * 
  * @action getClientNotification
  * @param string $entryId
  * @param KalturaNotificationType $type
  * @return KalturaClientNotification
  */
 function getClientNotificationAction($entryId, $type)
 {
     // in case of a multirequest, a mediaService.addFromUploadedFile may fail and therefore the resulting entry id will be empty
     // in such a case return immidiately without looking for the notification
     if ($entryId == '') {
         throw new KalturaAPIException(KalturaErrors::NOTIFICATION_FOR_ENTRY_NOT_FOUND, $entryId);
     }
     $notifications = BatchJobPeer::retrieveByEntryIdAndType($entryId, BatchJobType::NOTIFICATION, $type);
     // FIXME: throw error if not found
     if (count($notifications) == 0) {
         throw new KalturaAPIException(KalturaErrors::NOTIFICATION_FOR_ENTRY_NOT_FOUND, $entryId);
     }
     $notification = $notifications[0];
     $partnerId = $this->getPartnerId();
     $nofication_config_str = null;
     list($nofity, $nofication_config_str) = myPartnerUtils::shouldNotify($partnerId);
     if (!$nofity) {
         return new KalturaClientNotification();
     }
     $nofication_config = myNotificationsConfig::getInstance($nofication_config_str);
     $nofity_send_type = $nofication_config->shouldNotify($type);
     if ($nofity_send_type != myNotificationMgr::NOTIFICATION_MGR_SEND_SYNCH && $nofity_send_type != myNotificationMgr::NOTIFICATION_MGR_SEND_BOTH) {
         return new KalturaClientNotification();
     }
     $partner = PartnerPeer::retrieveByPK($partnerId);
     list($url, $signatureKey) = myNotificationMgr::getPartnerNotificationInfo($partner);
     list($params, $rawSignature) = myNotificationMgr::prepareNotificationData($url, $signatureKey, $notification, null);
     $serializedParams = http_build_query($params, "", "&");
     $result = new KalturaClientNotification();
     $result->url = $url;
     $result->data = $serializedParams;
     return $result;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:41,代码来源:NotificationService.php


示例10: impersonateAction

 /**
  * Start an impersonated session with Kaltura's server.
  * The result KS is the session key that you should pass to all services that requires a ticket.
  * 
  * @action impersonate
  * @param string $secret Remember to provide the correct secret according to the sessionType you want
  * @param int $impersonatedPartnerId
  * @param string $userId
  * @param KalturaSessionType $type Regular session or Admin session
  * @param int $partnerId
  * @param int $expiry KS expiry time in seconds
  * @param string $privileges 
  * @return string
  *
  * @throws APIErrors::START_SESSION_ERROR
  */
 function impersonateAction($secret, $impersonatedPartnerId, $userId = "", $type = 0, $partnerId = null, $expiry = 86400, $privileges = null)
 {
     KalturaResponseCacher::disableCache();
     // verify that partnerId exists and is in correspondence with given secret
     $result = myPartnerUtils::isValidSecret($partnerId, $secret, "", $expiry, $type);
     if ($result !== true) {
         throw new KalturaAPIException(APIErrors::START_SESSION_ERROR, $partnerId);
     }
     // verify partner is allowed to start session for another partner
     if (!myPartnerUtils::allowPartnerAccessPartner($partnerId, $this->partnerGroup(), $impersonatedPartnerId)) {
         throw new KalturaAPIException(APIErrors::START_SESSION_ERROR, $partnerId);
     }
     // get impersonated partner
     $impersonatedPartner = PartnerPeer::retrieveByPK($impersonatedPartnerId);
     if (!$impersonatedPartner) {
         // impersonated partner could not be fetched from the DB
         throw new KalturaAPIException(APIErrors::START_SESSION_ERROR, $partnerId);
     }
     // set the correct secret according to required session type
     if ($type == KalturaSessionType::ADMIN) {
         $impersonatedSecret = $impersonatedPartner->getAdminSecret();
     } else {
         $impersonatedSecret = $impersonatedPartner->getSecret();
     }
     // make sure the secret fits the one in the partner's table
     $ks = "";
     $result = kSessionUtils::startKSession($impersonatedPartner->getId(), $impersonatedSecret, $userId, $ks, $expiry, $type, "", $privileges, $partnerId);
     if ($result >= 0) {
         return $ks;
     } else {
         throw new KalturaAPIException(APIErrors::START_SESSION_ERROR, $partnerId);
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:49,代码来源:SessionService.php


示例11: myBatchPartnerUsage

 public function myBatchPartnerUsage($partnerId = null)
 {
     self::initDb();
     $partners_exists = true;
     $start_pos = 0;
     $bulk_size = 500;
     while ($partners_exists) {
         $c = new Criteria();
         if (!is_null($partnerId)) {
             $c->addAnd(PartnerPeer::ID, $partnerId);
         }
         $c->addAnd(PartnerPeer::PARTNER_PACKAGE, 1);
         // get only free partners
         $c->addAnd(PartnerPeer::MONITOR_USAGE, 1);
         $c->addAnd(PartnerPeer::STATUS, Partner::PARTNER_STATUS_DELETED, CRITERIA::NOT_EQUAL);
         $c->setOffset($start_pos);
         $c->setLimit($bulk_size);
         $partners = PartnerPeer::doSelect($c);
         if (!$partners) {
             KalturaLog::debug("No more partners. offset: {$start_pos} , limit: {$bulk_size} .");
             $partners_exists = false;
         } else {
             KalturaLog::debug("Looping " . ($start_pos + $bulk_size - 1) . " partners, offset: {$start_pos} .");
             foreach ($partners as $partner) {
                 myPartnerUtils::doPartnerUsage($partner, true);
             }
         }
         unset($partners);
         PartnerPeer::clearInstancePool();
         $start_pos += $bulk_size;
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:32,代码来源:myBatchPartnerUsage.class.php


示例12: createKSessionNoValidations

 public static function createKSessionNoValidations($partner_id, $puser_id, &$ks_str, $desired_expiry_in_seconds = 86400, $admin = false, $partner_key = "", $privileges = "")
 {
     $ks_max_expiry_in_seconds = myPartnerUtils::getExpiry($partner_id);
     if ($ks_max_expiry_in_seconds && $ks_max_expiry_in_seconds < $desired_expiry_in_seconds) {
         $desired_expiry_in_seconds = $ks_max_expiry_in_seconds;
     }
     $ks = new ks();
     $ks->valid_until = kApiCache::getTime() + $desired_expiry_in_seconds;
     // store in milliseconds to make comparison easier at validation time
     //			$ks->type = $admin ? ks::TYPE_KAS : ks::TYPE_KS;
     if ($admin == false) {
         $ks->type = ks::TYPE_KS;
     } else {
         $ks->type = $admin;
     }
     // if the admin > 1 - use it rather than automatially setting it to be 2
     $ks->partner_id = $partner_id;
     $ks->partner_pattern = $partner_id;
     $ks->error = 0;
     $ks->rand = microtime(true);
     $ks->user = $puser_id;
     $ks->privileges = $privileges;
     $ks_str = $ks->toSecureString();
     return 0;
 }
开发者ID:AdiTal,项目名称:server,代码行数:25,代码来源:kSessionUtils.class.php


示例13: execute

 public function execute()
 {
     $this->forceSystemAuthentication();
     $partner_id = $this->getRequestParameter('partner_id', -1);
     if ($partner_id >= 0) {
         myPartnerUtils::applyPartnerFilters($partner_id);
     }
     $this->partner_id = $partner_id;
     $order = $this->getRequestParameter('sort', kshow::KSHOW_SORT_MOST_VIEWED);
     $page = $this->getRequestParameter('page', 1);
     //$this->producer_id = $this->getRequestParameter('producer_id', 0 );
     //$this->kaltura_part_of_flag = $this->getRequestParameter('partof', 0 );
     $pager = kshowPeer::getOrderedPager($order, 10, $page);
     $kshow_list = $pager->getResults();
     dashboardUtils::updateKshowsRoughcutCount($kshow_list);
     $kshowsData = array();
     foreach ($kshow_list as $kshow) {
         $kshowsData[] = $this->createKShowData($kshow, $order);
     }
     // following variables will be used by the view
     $this->firstTime = $this->getRequestParameter('first', 1) == 1;
     $this->order = $order;
     $this->page = $page;
     $this->lastPage = $pager->getLastPage();
     $this->numResults = $pager->getNbResults();
     $this->kshowsData = $kshowsData;
     // allow the action buttons to show only for shows the user produced, and only for authenticated users, on their own pages
     $this->allowactions = true;
     // !$this->kaltura_part_of_flag && $this->getUser()->isAuthenticated() && $this->getUser()->getAttribute('id') == $this->producer_id;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:30,代码来源:viewShowsAction.class.php


示例14: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $kshow_id = $this->getPM("kshow_id");
     $detailed = $this->getP("detailed", false);
     $kshow_indexedCustomData3 = $this->getP("indexedCustomData3");
     $kshow = null;
     if ($kshow_id == kshow::KSHOW_ID_USE_DEFAULT) {
         // see if the partner has some default kshow to add to
         $kshow = myPartnerUtils::getDefaultKshow($partner_id, $subp_id, $puser_kuser);
         if ($kshow) {
             $kshow_id = $kshow->getId();
         }
     } elseif ($kshow_id) {
         $kshow = kshowPeer::retrieveByPK($kshow_id);
     } elseif ($kshow_indexedCustomData3) {
         $kshow = kshowPeer::retrieveByIndexedCustomData3($kshow_indexedCustomData3);
     }
     if (!$kshow) {
         $this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
     } else {
         $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
         $wrapper = objectWrapperBase::getWrapperClass($kshow, $level);
         // TODO - remove this code when cache works properly when saving objects (in their save method)
         $wrapper->removeFromCache("kshow", $kshow_id);
         $this->addMsg("kshow", $wrapper);
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:27,代码来源:getkshowAction.class.php


示例15: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $allow_empty = $this->getP("allow_empty_field", false);
     if ($allow_empty == "false" || $allow_empty === 0) {
         $allow_empty = false;
     }
     $partner = new Partner();
     $obj_wrapper = objectWrapperBase::getWrapperClass($partner, 0);
     $updateable_fields = $obj_wrapper->getUpdateableFields();
     // TODO - use fillObjectFromMapOrderedByFields instead
     $fields_modified = baseObjectUtils::fillObjectFromMap($this->getInputParams(), $partner, "partner_", $updateable_fields, BasePeer::TYPE_PHPNAME, $allow_empty);
     // check that mandatory fields were set
     // TODO
     if (count($fields_modified) > 0) {
         $target_partner = PartnerPeer::retrieveByPK($partner_id);
         if ($partner && $target_partner) {
             if (@$fields_modified["adminEmail"] && $target_partner->getAdminEmail() != $fields_modified["adminEmail"]) {
                 myPartnerUtils::emailChangedEmail($partner_id, $target_partner->getAdminEmail(), $fields_modified["adminEmail"], $target_partner->getName(), PartnerPeer::KALTURAS_PARTNER_EMAIL_CHANGE);
             }
             $partner->setType($target_partner->getType());
             baseObjectUtils::fillObjectFromObject($updateable_fields, $partner, $target_partner, baseObjectUtils::CLONE_POLICY_PREFER_NEW, null, BasePeer::TYPE_PHPNAME, $allow_empty);
             $target_partner->save();
             $this->addMsg("partner", objectWrapperBase::getWrapperClass($target_partner, objectWrapperBase::DETAIL_LEVEL_DETAILED));
             $this->addDebug("added_fields", $fields_modified);
         } else {
             $this->addError(APIErrors::UNKNOWN_PARTNER_ID);
         }
     } else {
         $this->addError(APIErrors::NO_FIELDS_SET_FOR_PARTNER);
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:31,代码来源:updatepartnerAction.class.php


示例16: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $kshow_id = $this->getP("kshow_id", kshow::KSHOW_ID_USE_DEFAULT);
     $entry = null;
     if ($kshow_id == kshow::KSHOW_ID_USE_DEFAULT) {
         // see if the partner has some default kshow to add to
         $kshow = myPartnerUtils::getDefaultKshow($partner_id, $subp_id, $puser_kuser);
         if ($kshow) {
             $kshow_id = $kshow->getId();
         }
     } elseif ($kshow_id == kshow::KSHOW_ID_CREATE_NEW) {
         // if the partner allows - create a new kshow
         $kshow = myPartnerUtils::getDefaultKshow($partner_id, $subp_id, $puser_kuser, null, true);
         if ($kshow) {
             $kshow_id = $kshow->getId();
             $entry = $kshow->getShowEntry();
             // use the newly created kshow's roughcut
         }
     } else {
         $kshow = kshowPeer::retrieveByPK($kshow_id);
     }
     if (!$kshow) {
         // the partner is attempting to add an entry to some invalid or non-existing kwho
         $this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
         return;
     }
     if (!$entry) {
         $entry = $kshow->createEntry(entry::ENTRY_MEDIA_TYPE_SHOW, $kshow->getProducerId(), "&auto_edit.jpg", "");
     }
     $obj_wrapper = objectWrapperBase::getWrapperClass($entry, 0);
     $fields_modified = baseObjectUtils::fillObjectFromMap($this->getInputParams(), $entry, $this->getObjectPrefix() . "_", array("name", "tags", "groupId", "partnerData", "permissions", "screenName", "description", "indexedCustomData1"));
     $entry->save();
     $this->addMsg($this->getObjectPrefix(), objectWrapperBase::getWrapperClass($entry, objectWrapperBase::DETAIL_LEVEL_REGULAR));
     $this->addDebug("added_fields", $fields_modified);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:35,代码来源:addroughcutentryAction.class.php


示例17: doGetFlavorAssetUrl

 /**
  * @param flavorAsset $flavorAsset
  * @return string
  */
 protected function doGetFlavorAssetUrl(flavorAsset $flavorAsset)
 {
     $entry = $flavorAsset->getentry();
     $partnerId = $entry->getPartnerId();
     $subpId = $entry->getSubpId();
     $flavorAssetId = $flavorAsset->getId();
     $partnerPath = myPartnerUtils::getUrlForPartner($partnerId, $subpId);
     $this->setFileExtension($flavorAsset->getFileExt());
     $versionString = $this->getFlavorVersionString($flavorAsset);
     $url = "/s{$partnerPath}/serveFlavor/entryId/" . $flavorAsset->getEntryId() . "{$versionString}/flavorId/{$flavorAssetId}";
     if ($this->clipTo) {
         $url .= "/clipTo/{$this->clipTo}";
     }
     if ($this->extention) {
         $url .= "/name/a.{$this->extention}";
     }
     $url = str_replace('\\', '/', $url);
     if ($this->protocol != StorageProfile::PLAY_FORMAT_RTMP) {
         $url .= '?novar=0';
         $syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
         $seekFromBytes = $this->getSeekFromBytes(kFileSyncUtils::getLocalFilePathForKey($syncKey));
         if ($seekFromBytes) {
             $url .= '&fs=' . $seekFromBytes;
         }
     } else {
         if ($this->extention && strtolower($this->extention) != 'flv' || $this->containerFormat && strtolower($this->containerFormat) != 'flash video') {
             $url = "mp4:{$url}";
         }
     }
     return $url;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:35,代码来源:kLimeLightUrlManager.php


示例18: startKSession

 public static function startKSession($partner_id, $partner_secret, $puser_id, &$ks_str, $desired_expiry_in_seconds = 86400, $admin = false, $partner_key = "", $privileges = "", $master_partner_id = null, $additional_data = null)
 {
     $ks_max_expiry_in_seconds = "";
     // see if we want to use the generic setting of the partner
     $result = myPartnerUtils::isValidSecret($partner_id, $partner_secret, $partner_key, $ks_max_expiry_in_seconds, $admin);
     if ($result >= 0) {
         if ($ks_max_expiry_in_seconds && $ks_max_expiry_in_seconds < $desired_expiry_in_seconds) {
             $desired_expiry_in_seconds = $ks_max_expiry_in_seconds;
         }
         //	echo "startKSession: from DB: $ks_max_expiry_in_seconds | desired: $desired_expiry_in_seconds " ;
         $ks = new ks();
         $ks->valid_until = time() + $desired_expiry_in_seconds;
         // store in milliseconds to make comparison easier at validation time
         //			$ks->type = $admin ? ks::TYPE_KAS : ks::TYPE_KS;
         if ($admin == false) {
             $ks->type = ks::TYPE_KS;
         } else {
             $ks->type = $admin;
         }
         // if the admin > 1 - use it rather than automatially setting it to be 2
         $ks->partner_id = $partner_id;
         $ks->master_partner_id = $master_partner_id;
         $ks->partner_pattern = $partner_id;
         $ks->error = 0;
         $ks->rand = microtime(true);
         $ks->user = $puser_id;
         $ks->privileges = $privileges;
         $ks->additional_data = $additional_data;
         $ks_str = $ks->toSecureString();
         return 0;
     } else {
         return $result;
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:34,代码来源:kSessionUtils.class.php


示例19: getFlavorParamsFromFileFormat

 /**
  * return the flavor params the best fits the fileFormat for a given partner_id
  * 
  * @param int $partnerId
  * @param string $fileFormat
  * @return FlavorParams
  */
 public static function getFlavorParamsFromFileFormat($partnerId, $fileFormat, $ignoreSourceTag = true)
 {
     $defaultCriteria = assetParamsPeer::getCriteriaFilter()->getFilter();
     $defaultCriteria->remove(assetParamsPeer::PARTNER_ID);
     //		assetParamsPeer::allowAccessToPartner0AndPartnerX($partnerId); // the flavor params can be from partner 0 too
     $c = new Criteria();
     $c->addAnd(assetParamsPeer::PARTNER_ID, array($partnerId, 0), Criteria::IN);
     //		$c->add (  assetParamsPeer::FORMAT , $fileFormat );
     $possible_flavor_params = assetParamsPeer::doSelect($c);
     myPartnerUtils::resetPartnerFilter('assetParams');
     $best_fp = null;
     foreach ($possible_flavor_params as $fp) {
         if ($fileFormat != $fp->getFormat()) {
             continue;
         }
         if ($ignoreSourceTag && $fp->hasTag(flavorParams::TAG_SOURCE)) {
             continue;
         }
         if (!$best_fp) {
             $best_fp = $fp;
         }
         if ($fp->getPartnerId() != $partnerId) {
             continue;
         }
         // same format for the partner
         $best_fp = $fp;
         break;
     }
     // if not fount any - choose the first flavor params from the list
     if (!$best_fp) {
         $best_fp = $possible_flavor_params[0];
     }
     return $best_fp;
 }
开发者ID:DBezemer,项目名称:server,代码行数:41,代码来源:myConversionProfileUtils.class.php


示例20: execute

 /**
  * Will forward to the regular swf player according to the widget_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         die;
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     $host = myPartnerUtils::getHost($partner_id);
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         $ui_conf_swf_url = "/swf/simpleeditor.swf";
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     // handle buggy case for backward compatiblity
     $partner_host = $host;
     if ($partner_host == "http://www.kaltura.com") {
         $partner_host = 1;
     }
     // otherwise the kse will build a flawed url with [[IMPORT]]
     $params = "contentUrl=" . urlencode($swf_url) . "&host=" . str_replace("http://", "", str_replace("https://", "", $partner_host)) . "&cdnHost=" . str_replace("http://", "", str_replace("https://", "", myPartnerUtils::getCdnHost($partner_id))) . "&uiConfId=" . $ui_conf_id . "&disableurlhashing=" . kConf::get('disable_url_hashing');
     $wrapper_swf = myContentStorage::getFSFlashRootPath() . "/flexwrapper/" . kConf::get('editors_flex_wrapper_version') . "/FlexWrapper.swf";
     $this->redirect($host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . "{$wrapper_swf}?{$params}");
 }
开发者ID:DBezemer,项目名称:server,代码行数:36,代码来源:kseAction.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP myclass类代码示例发布时间:2022-05-23
下一篇:
PHP myNotificationMgr类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap