Ejemplo n.º 1
0
 /**
  * @param PEAR_Frontend_*
  * @param array
  * @param PEAR_Config
  */
 function __construct($ui = null, $options = array(), $config = null)
 {
     parent::__construct();
     $this->_options = $options;
     if ($config !== null) {
         $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 ($config !== 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);
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * PEAR_Builder constructor.
  *
  * @param object $ui user interface object (instance of PEAR_Frontend_*)
  *
  * @access public
  */
 function __construct(&$ui)
 {
     parent::__construct();
     $this->setFrontendObject($ui);
 }