當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。