mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
- Define the PEAR constants when they are not set (be nice
with the "--wihout-pear" people who finally regrets) - Added method getLayers()
This commit is contained in:
parent
6ec8fbc30e
commit
49dacbee8c
@ -28,6 +28,15 @@ $GLOBALS['_PEAR_Config_instance'] = null;
|
||||
|
||||
define('PEAR_CONFIG_DEFAULT_DOCDIR',
|
||||
PHP_DATADIR.DIRECTORY_SEPARATOR.'pear'.DIRECTORY_SEPARATOR.'doc');
|
||||
|
||||
// in case a --without-pear PHP installation is used
|
||||
if (!defined('PEAR_INSTALL_DIR')) {
|
||||
define('PEAR_INSTALL_DIR', PHP_LIBDIR);
|
||||
}
|
||||
if (!defined('PEAR_EXTENSION_DIR')) {
|
||||
define('PEAR_EXTENSION_DIR', PHP_EXTENSION_DIR);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a class for storing simple configuration values keeping
|
||||
* track of which are system-defined, user-defined or defaulted. By
|
||||
@ -766,6 +775,18 @@ when installing packages without a version or state specified',
|
||||
}
|
||||
|
||||
// }}}
|
||||
|
||||
/**
|
||||
* Returns the layers defined (except the 'default' one)
|
||||
*
|
||||
* @return array of the defined layers
|
||||
*/
|
||||
function getLayers()
|
||||
{
|
||||
$cf = $this->configuration;
|
||||
unset($cf['default']);
|
||||
return array_keys($cf);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user