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


PHP kPluginableEnumsManager::getCoreMap方法代码示例

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


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

示例1: getFromObjectMap

 public function getFromObjectMap()
 {
     $className = get_class($this);
     $cacheKey = kCurrentContext::$ks_hash . '_' . $className;
     if (isset(self::$fromObjectMap[$cacheKey])) {
         return self::$fromObjectMap[$cacheKey];
     }
     $reflector = KalturaTypeReflectorCacher::get($className);
     if (!$reflector) {
         return array();
     }
     $properties = $reflector->getProperties();
     if ($reflector->requiresReadPermission() && !kPermissionManager::getReadPermitted($className, kApiParameterPermissionItem::ALL_VALUES_IDENTIFIER)) {
         return array();
         // current user has no permission for accessing this object class
     }
     $result = array();
     foreach ($this->getMapBetweenObjects() as $this_prop => $object_prop) {
         if (is_numeric($this_prop)) {
             $this_prop = $object_prop;
         }
         if (!isset($properties[$this_prop]) || $properties[$this_prop]->isWriteOnly()) {
             continue;
         }
         // ignore property if it requires a read permission which the current user does not have
         if ($properties[$this_prop]->requiresReadPermission() && !kPermissionManager::getReadPermitted($this->getDeclaringClassName($this_prop), $this_prop)) {
             KalturaLog::debug("Missing read permission for property {$this_prop}");
             continue;
         }
         $getter_name = "get{$object_prop}";
         $getter_params = array();
         if (in_array($this_prop, array("createdAt", "updatedAt", "deletedAt"))) {
             $getter_params = array(null);
         }
         $arrayClass = null;
         if ($properties[$this_prop]->isArray()) {
             $class = $properties[$this_prop]->getType();
             if (method_exists($class, 'fromDbArray')) {
                 $arrayClass = $class;
             }
         }
         $enumMap = null;
         if ($properties[$this_prop]->isDynamicEnum()) {
             $propertyType = $properties[$this_prop]->getType();
             $enumClass = call_user_func(array($propertyType, 'getEnumClass'));
             if ($enumClass) {
                 $enumMap = kPluginableEnumsManager::getCoreMap($enumClass);
             }
         }
         $result[] = array($this_prop, $getter_name, $getter_params, $arrayClass, $enumMap);
     }
     self::$fromObjectMap[$cacheKey] = $result;
     return $result;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:54,代码来源:KalturaObject.php

示例2: isSearchProviderSource

 public static function isSearchProviderSource($source)
 {
     $refClass = new ReflectionClass('EntrySourceType');
     $coreConstants = $refClass->getConstants();
     if (in_array($source, array_values($coreConstants))) {
         return false;
     }
     $typeMap = kPluginableEnumsManager::getCoreMap('EntrySourceType');
     if (isset($typeMap[$source])) {
         return false;
     }
     return true;
 }
开发者ID:AdiTal,项目名称:server,代码行数:13,代码来源:entry.php

示例3: getCuePointTypeToClone

 /**
  * @param entry $entry
  * @return array
  */
 private static function getCuePointTypeToClone($entry)
 {
     $listOfEnumIds = array();
     $cue_point_plugin_map = kPluginableEnumsManager::getCoreMap('CuePointType');
     foreach ($cue_point_plugin_map as $dynamic_enum_id => $plugin_name) {
         $plugin = kPluginableEnumsManager::getPlugin($plugin_name);
         if ($plugin::shouldCloneByProperty($entry) == true) {
             $listOfEnumIds[] = $dynamic_enum_id;
         }
     }
     return $listOfEnumIds;
 }
开发者ID:wzur,项目名称:server,代码行数:16,代码来源:kCuePointManager.php


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