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


PHP DevblocksPlatform::getExtensionRegistry方法代码示例

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


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

示例1: getExtension

 /**
  * Returns the manifest of a given extension ID.
  *
  * @static
  * @param string $extension_id
  * @param boolean $as_instance
  * @return DevblocksExtensionManifest
  */
 static function getExtension($extension_id, $as_instance = false, $ignore_acl = false)
 {
     $result = null;
     $extensions = DevblocksPlatform::getExtensionRegistry($ignore_acl);
     if (is_array($extensions)) {
         foreach ($extensions as $extension) {
             /* @var $extension DevblocksExtensionManifest */
             if ($extension->id == $extension_id) {
                 $result = $extension;
                 break;
             }
         }
     }
     if ($as_instance && !is_null($result)) {
         return $result->createInstance();
     }
     return $result;
 }
开发者ID:jstanden,项目名称:devblocks,代码行数:26,代码来源:Devblocks.class.php

示例2: getExtensionPoints

 static function getExtensionPoints()
 {
     $cache = self::getCacheService();
     if (false !== ($points = $cache->load(self::CACHE_POINTS))) {
         return $points;
     }
     $extensions = DevblocksPlatform::getExtensionRegistry();
     foreach ($extensions as $extension) {
         /* @var $extension DevblocksExtensionManifest */
         $point = $extension->point;
         if (!isset($points[$point])) {
             $p = new DevblocksExtensionPoint();
             $p->id = $point;
             $points[$point] = $p;
         }
         $points[$point]->extensions[$extension->id] = $extension;
     }
     $cache->save($points, self::CACHE_POINTS);
     return $points;
 }
开发者ID:sluther,项目名称:portsensor,代码行数:20,代码来源:Devblocks.class.php

示例3: getAll

 static function getAll()
 {
     $extensions = DevblocksPlatform::getExtensionRegistry(true);
     $cache = DevblocksPlatform::getCacheService();
     if (null == ($params = $cache->load(self::_CACHE_ALL))) {
         $db = DevblocksPlatform::getDatabaseService();
         $prefix = APP_DB_PREFIX != '' ? APP_DB_PREFIX . '_' : '';
         // [TODO] Cleanup
         $params = array();
         // Add manifest params as our initial params
         foreach ($extensions as $extension) {
             /* @var $extension DevblocksExtensionManifest */
             $params[$extension->id] = $extension->params;
         }
         // Now load the DB params on top of them
         $sql = sprintf("SELECT extension_id, property, value " . "FROM %sproperty_store ", $prefix);
         $results = $db->GetArray($sql);
         foreach ($results as $row) {
             $params[$row['extension_id']][$row['property']] = $row['value'];
         }
         $cache->save($params, self::_CACHE_ALL);
     }
     return $params;
 }
开发者ID:jstanden,项目名称:devblocks,代码行数:24,代码来源:DAO.php


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