本文整理汇总了PHP中PEAR_Common::PEAR_Common方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR_Common::PEAR_Common方法的具体用法?PHP PEAR_Common::PEAR_Common怎么用?PHP PEAR_Common::PEAR_Common使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PEAR_Common
的用法示例。
在下文中一共展示了PEAR_Common::PEAR_Common方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
}
}
}
示例2:
/**
* 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);
}
示例3:
function PEAR_Packager()
{
parent::PEAR_Common();
}
示例4: substr
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();
}
示例5:
/**
* 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'));
}