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


PHP PEAR_Registry::listAllPackages方法代码示例

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


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

示例1: rebuildDB

 /**
  * Rebuild the dependency DB by reading registry entries.
  * @return true|PEAR_Error
  */
 function rebuildDB()
 {
     $depdb = array('_version' => $this->_version);
     if (!$this->hasWriteAccess()) {
         // allow startup for read-only with older Registry
         return $depdb;
     }
     $packages = $this->_registry->listAllPackages();
     if (PEAR::isError($packages)) {
         return $packages;
     }
     foreach ($packages as $channel => $ps) {
         foreach ($ps as $package) {
             $package = $this->_registry->getPackage($package, $channel);
             if (PEAR::isError($package)) {
                 return $package;
             }
             $this->_setPackageDeps($depdb, $package);
         }
     }
     $error = $this->_writeDepDB($depdb);
     if (PEAR::isError($error)) {
         return $error;
     }
     $this->_cache = $depdb;
     return true;
 }
开发者ID:fathitarek,项目名称:cop5725-dbms-project,代码行数:31,代码来源:DependencyDB.php

示例2: foreach

 /**
  * @param PEAR_Frontend_*
  * @param array
  * @param PEAR_Config
  */
 function PEAR_Downloader(&$ui, $options, &$config)
 {
     parent::PEAR_Common();
     $this->_options = $options;
     $this->config =& $config;
     $this->_preferredState = $this->config->get('preferred_state');
     $this->ui =& $ui;
     if (!$this->_preferredState) {
         // don't inadvertantly use a non-set preferred_state
         $this->_preferredState = null;
     }
     if (isset($this->_options['installroot'])) {
         $this->config->setInstallRoot($this->_options['installroot']);
     }
     $this->_registry =& $config->getRegistry();
     if (isset($this->_options['alldeps']) || isset($this->_options['onlyreqdeps'])) {
         $this->_installed = $this->_registry->listAllPackages();
         foreach ($this->_installed as $key => $unused) {
             if (!count($unused)) {
                 continue;
             }
             $strtolower = create_function('$a', 'return strtolower($a);');
             array_walk($this->_installed[$key], $strtolower);
         }
     }
 }
开发者ID:shen0834,项目名称:util,代码行数:31,代码来源:Downloader.php

示例3: rebuildDB

 /**
  * Rebuild the dependency DB by reading registry entries.
  * @return true|PEAR_Error
  */
 function rebuildDB()
 {
     $depdb = array('_version' => $this->_version);
     $packages = $this->_registry->listAllPackages();
     foreach ($packages as $channel => $ps) {
         foreach ($ps as $package) {
             $package = $this->_registry->getPackage($package, $channel);
             $this->_setPackageDeps($depdb, $package);
         }
     }
     $error = $this->_writeDepDB($depdb);
     if (PEAR::isError($error)) {
         return $error;
     }
     $this->_cache = $depdb;
     return true;
 }
开发者ID:alex-k,项目名称:velotur,代码行数:21,代码来源:DependencyDB.php


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