/** * @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); } } }
/** * PEAR_Builder constructor. * * @param object $ui user interface object (instance of PEAR_Frontend_*) * * @access public */ function PEAR_Builder(&$ui) { parent::PEAR_Common(); $this->setFrontendObject($ui); }
function PEAR_Packager() { parent::PEAR_Common(); }
function PEAR_Downloader(&$ui, $options, &$config) { $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; } $php_dir = $this->_config->get('php_dir'); if (isset($this->_options['installroot'])) { if (substr($this->_options['installroot'], -1) == DIRECTORY_SEPARATOR) { $this->_options['installroot'] = substr($this->_options['installroot'], 0, -1); } $php_dir = $this->_prependPath($php_dir, $this->_options['installroot']); } $this->_registry =& new PEAR_Registry($php_dir); $this->_remote =& new PEAR_Remote($config); if (isset($this->_options['alldeps']) || isset($this->_options['onlyreqdeps'])) { $this->_installed = $this->_registry->listPackages(); array_walk($this->_installed, create_function('&$v,$k', '$v = strtolower($v);')); $this->_installed = array_flip($this->_installed); } parent::PEAR_Common(); }
/** * PEAR_Installer constructor. * * @param object $ui user interface object (instance of PEAR_Frontend_*) * * @access public */ function PEAR_Installer(&$ui) { parent::PEAR_Common(); $this->setFrontendObject($ui); $this->debug = $this->config->get('verbose'); $this->registry =& new PEAR_Registry($this->config->get('php_dir')); }