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


PHP KalturaLog::INFO方法代码示例

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


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

示例1: registerAction

 /**
  * Create a new Partner object
  * 
  * @action register
  * @param KalturaPartner $partner
  * @param string $cmsPassword
  * @param int $templatePartnerId
  * @return KalturaPartner
  *
  * @throws APIErrors::PARTNER_REGISTRATION_ERROR
  */
 public function registerAction(KalturaPartner $partner, $cmsPassword = "", $templatePartnerId = null)
 {
     KalturaResponseCacher::disableCache();
     $dbPartner = $partner->toPartner();
     $c = new Criteria();
     $c->addAnd(UserLoginDataPeer::LOGIN_EMAIL, $partner->adminEmail, Criteria::EQUAL);
     $c->setLimit(1);
     $existingUser = UserLoginDataPeer::doCount($c) > 0;
     try {
         if ($cmsPassword == "") {
             $cmsPassword = null;
         }
         $parentPartnerId = null;
         if ($this->getKs() && $this->getKs()->isAdmin()) {
             $parentPartnerId = $this->getKs()->partner_id;
             if ($parentPartnerId == Partner::ADMIN_CONSOLE_PARTNER_ID) {
                 $parentPartnerId = null;
             } else {
                 // only if this partner is a var/group, allow setting it as parent for the new created partner
                 $parentPartner = PartnerPeer::retrieveByPK($parentPartnerId);
                 if (!($parentPartner->getPartnerGroupType() == PartnerGroupType::VAR_GROUP || $parentPartner->getPartnerGroupType() == PartnerGroupType::GROUP)) {
                     throw new KalturaAPIException(KalturaErrors::NON_GROUP_PARTNER_ATTEMPTING_TO_ASSIGN_CHILD, $parentPartnerId);
                 }
                 if ($templatePartnerId) {
                     $templatePartner = PartnerPeer::retrieveByPK($templatePartnerId);
                     if (!$templatePartner || $templatePartner->getPartnerParentId() != $parentPartnerId) {
                         throw new KalturaAPIException(KalturaErrors::NON_GROUP_PARTNER_ATTEMPTING_TO_ASSIGN_CHILD, $parentPartnerId);
                     }
                 }
             }
         }
         $partner_registration = new myPartnerRegistration($parentPartnerId);
         $ignorePassword = false;
         if ($existingUser && $this->getKs()->partner_id == Partner::ADMIN_CONSOLE_PARTNER_ID && kuserPeer::getKuserByEmail($partner->adminEmail, Partner::ADMIN_CONSOLE_PARTNER_ID) != null) {
             $ignorePassword = true;
         }
         list($pid, $subpid, $pass, $hashKey) = $partner_registration->initNewPartner($dbPartner->getName(), $dbPartner->getAdminName(), $dbPartner->getAdminEmail(), $dbPartner->getCommercialUse(), "yes", $dbPartner->getDescription(), $dbPartner->getUrl1(), $cmsPassword, $dbPartner, $ignorePassword, $templatePartnerId);
         $dbPartner = PartnerPeer::retrieveByPK($pid);
         // send a confirmation email as well as the result of the service
         $partner_registration->sendRegistrationInformationForPartner($dbPartner, false, $existingUser);
     } catch (SignupException $se) {
         KalturaLog::INFO($se);
         throw new KalturaAPIException(APIErrors::PARTNER_REGISTRATION_ERROR, 'SE ' . $se->getMessage());
     } catch (Exception $ex) {
         KalturaLog::CRIT($ex);
         // this assumes the partner name is unique - TODO - remove key from DB !
         throw new KalturaAPIException(APIErrors::PARTNER_REGISTRATION_ERROR, $ex->getMessage());
     }
     $partner = new KalturaPartner();
     // start from blank
     $partner->fromPartner($dbPartner);
     $partner->secret = $dbPartner->getSecret();
     $partner->adminSecret = $dbPartner->getAdminSecret();
     $partner->cmsPassword = $pass;
     return $partner;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:67,代码来源:PartnerService.php

示例2: microtime

require_once "../../bootstrap.php";
KalturaLog::setContext("TESTME");
$service = $_GET["service"];
$action = $_GET["action"];
$bench_start = microtime(true);
KalturaLog::INFO(">------- api_v3 testme [{$service}][{$action}]-------");
function toArrayRecursive(KalturaPropertyInfo $propInfo)
{
    return $propInfo->toArray();
}
$serviceMap = KalturaServicesMap::getMap();
$actionInfo = null;
try {
    $serviceReflector = $serviceMap[strtolower($service)];
    /* @var $serviceReflector KalturaServiceActionItem */
    $actionReflector = new KalturaActionReflector($service, $action, $serviceReflector->actionMap[$action]);
    $actionParams = $actionReflector->getActionParams();
    $actionInfo = $actionReflector->getActionInfo();
    $actionInfo = array("actionParams" => array(), "description" => $actionInfo->description);
    foreach ($actionParams as $actionParam) {
        $actionInfo["actionParams"][] = toArrayRecursive($actionParam);
    }
} catch (Exception $ex) {
    KalturaLog::ERR("<------- api_v3 testme [{$service}][{$action}\n" . $ex->__toString() . " " . " -------");
}
//echo "<pre>";
//echo print_r($actionInfo);
echo json_encode($actionInfo);
$bench_end = microtime(true);
KalturaLog::INFO("<------- api_v3 testme [{$service}][{$action}][" . ($bench_end - $bench_start) . "] -------");
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:30,代码来源:ajax-get-action-info.php

示例3: array

$subClasses = array();
try {
    KalturaTypeReflector::setClassInheritMapPath(KAutoloader::buildPath(kConf::get("cache_root_path"), "api_v3", "KalturaClassInheritMap.cache"));
    if (!KalturaTypeReflector::hasClassInheritMapCache()) {
        $config = new Zend_Config_Ini("../../config/testme.ini");
        $indexConfig = $config->get('testme');
        $include = $indexConfig->get("include");
        $exclude = $indexConfig->get("exclude");
        $excludePaths = $indexConfig->get("excludepaths");
        $additional = $indexConfig->get("additional");
        $clientGenerator = new DummyForDocsClientGenerator();
        $clientGenerator->setIncludeOrExcludeList($include, $exclude, $excludePaths);
        $clientGenerator->setAdditionalList($additional);
        $clientGenerator->load();
        $objects = $clientGenerator->getTypes();
        KalturaTypeReflector::setClassMap(array_keys($objects));
    }
    $subClassesNames = KalturaTypeReflector::getSubClasses($type);
    foreach ($subClassesNames as $subClassName) {
        $subClass = new KalturaPropertyInfo($subClassName);
        $subClasses[] = $subClass->toArray();
    }
} catch (Exception $ex) {
    KalturaLog::ERR("<------- api_v3 testme [{$type}]\n" . $ex->__toString() . " " . " -------");
}
//echo "<pre>";
//echo print_r($actionInfo);
echo json_encode($subClasses);
$bench_end = microtime(true);
KalturaLog::INFO("<------- api_v3 testme type [{$type}][" . ($bench_end - $bench_start) . "] -------");
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:30,代码来源:ajax-get-type-subclasses.php


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