![]() |
Bearsampp 2026.9.23
|
Go to the source code of this file.
Namespaces | |
| namespace | PEAR |
Functions | |
| bearsamppRelocatePearRegistry ($pearDir) | |
| cmdHelp ($command) | |
| error_handler ($errno, $errmsg, $file, $line) | |
| usage ($error=null, $helpsubject=null) | |
Variables | |
| $_PEAR_PHPDIR = '#$%^&*' | |
| $all_commands = PEAR_Command::getCommands() | |
| $argv = Console_Getopt::readPHPArgv() | |
| $cmdopts = array() | |
| if( $raw) foreach($opts as $opt) if( $store_system_config) if($store_user_config) | $command = (isset($options[1][0])) ? $options[1][0] : null |
| $config = &PEAR_Config::singleton($pear_user_config, $pear_system_config) | |
| $fetype = 'CLI' | |
| $options = Console_Getopt::getopt2($argv, "c:C:d:D:Gh?sSqu:vV") | |
| if(PEAR::isError($options)) | $opts = $options[0] |
| $pear_package_version = "1.10.18" | |
| $pear_system_config = '' | |
| $pearDir = Path::getPearPath() . '/pear' | |
| if(php_sapi_name() !='cli' &&isset($argv[1]) && $argv[1]=='--') | $progname = PEAR_RUNTYPE |
| $raw = false | |
| $store_system_config = false | |
| $store_user_config = false | |
| $ui = &PEAR_Command::getFrontendObject() | |
| $verbose = 1 | |
| if($progname=='gpear'|| $progname=='pear-gtk') | else |
| const | PEAR_IGNORE_BACKTRACE (!defined('PEAR_RUNTYPE')) 1 |
| bearsamppRelocatePearRegistry | ( | $pearDir | ) |
Makes the PEAR registry portable.
The committed .registry/*.reg files store every path relative to the Bearsampp root (e.g. core\libs\php\pear\pear\PEAR.php), so the bundle is relocatable. PEAR itself needs absolute paths because it consumes "installed_as" when listing and deleting installed package files and the "dirtree" keys when cleaning directories up on uninstall, so on every invocation each root-relative entry is resolved against the runtime root before the registry is read. The rewrite is idempotent; absolute entries left over from an older bundle are re-based as well.
Definition at line 46 of file pearcmd.php.
References $pearDir.
| cmdHelp | ( | $command | ) |
Return help string for specified command
| string | $command | Command to return help for |
Definition at line 459 of file pearcmd.php.
References $all_commands, $command, $config, $progname, PEAR_Command\getHelp(), and PEAR_Command\getShortcuts().
Referenced by usage().
| error_handler | ( | $errno, | |
| $errmsg, | |||
| $file, | |||
| $line ) |
error_handler
| mixed | $errno | Error number |
| mixed | $errmsg | Message |
| mixed | $file | Filename |
| mixed | $line | Line number |
@access public
Definition at line 519 of file pearcmd.php.
References $_PEAR_PHPDIR, $GLOBALS, and E_USER_ERROR.
| usage | ( | $error = null, | |
| $helpsubject = null ) |
Display usage information
| mixed | $error | Optional error message |
| mixed | $helpsubject | Optional subject/command to display help for |
Definition at line 414 of file pearcmd.php.
References $all_commands, $progname, cmdHelp(), exit, and PEAR_Command\getDescription().
| if (PEAR::isError( $config)) $_PEAR_PHPDIR = '#$%^&*' |
Definition at line 122 of file pearcmd.php.
Referenced by error_handler().
| $all_commands = PEAR_Command::getCommands() |
Definition at line 135 of file pearcmd.php.
| $argv = Console_Getopt::readPHPArgv() |
Definition at line 137 of file pearcmd.php.
Referenced by System\_parseArgs(), and Console_Getopt\readPHPArgv().
| $cmdopts = array() |
Definition at line 207 of file pearcmd.php.
| if($raw) foreach( $opts as $opt) if($store_system_config) if ( $store_user_config) $command = (isset($options[1][0])) ? $options[1][0] : null |
Definition at line 322 of file pearcmd.php.
Referenced by ActionDebugBase\__construct(), PEAR_Builder\_build_win32(), PEAR_Command_Registry\_doInfo2(), PEAR_Command_Install\_filterUptodatePackages(), PEAR_Builder\_runCommand(), PEAR_Command_Package\_svnFindPath(), PEAR_Command_Package\_svnRemoveTag(), CommandRunner\background(), cmdHelp(), PEAR_Command_Channels\doAdd(), PEAR_Command_Channels\doAlias(), PEAR_Command_Build\doBuild(), PEAR_Command_Install\doBundle(), PEAR_Command_Remote\doClearCache(), PEAR_Command_Config\doConfigCreate(), PEAR_Command_Config\doConfigGet(), PEAR_Command_Config\doConfigHelp(), PEAR_Command_Config\doConfigSet(), PEAR_Command_Config\doConfigShow(), PEAR_Command_Package\doConvert(), PEAR_Command_Package\doCvsDiff(), PEAR_Command_Package\doCvsTag(), PEAR_Command_Channels\doDelete(), PEAR_Command_Channels\doDiscover(), PEAR_Command_Remote\doDownload(), PEAR_Command_Mirror\doDownloadAll(), PEAR_Command_Registry\doFileList(), PEAR_Command_Channels\doInfo(), PEAR_Command_Registry\doInfo(), PEAR_Command_Install\doInstall(), PEAR_Command_Channels\doList(), PEAR_Command_Registry\doList(), PEAR_Command_Registry\doListAll(), PEAR_Command_Remote\doListAll(), PEAR_Command_Remote\doListUpgrades(), PEAR_Command_Channels\doLogin(), PEAR_Command_Channels\doLogout(), PEAR_Command_Package\doMakeRPM(), PEAR_Command_Package\doPackage(), PEAR_Command_Pickle\doPackage(), PEAR_Command_Package\doPackageDependencies(), PEAR_Command_Package\doPackageValidate(), PEAR_Command_Remote\doRemoteInfo(), PEAR_Command_Remote\doRemoteList(), PEAR_Command_Install\doRunScripts(), PEAR_Command_Test\doRunTests(), PEAR_Command_Remote\doSearch(), PEAR_Command_Registry\doShellTest(), PEAR_Command_Package\doSign(), PEAR_Command_Package\doSvnTag(), PEAR_Command_Install\doUninstall(), PEAR_Command_Channels\doUpdate(), PEAR_Command_Channels\doUpdateAll(), PEAR_Command_Install\doUpgradeAll(), Nssm\exec(), PEAR_Command\factory(), PEAR_Command_Common\getCommands(), PEAR_Command\getDescription(), PEAR_Command\getGetoptArgs(), PEAR_Command_Common\getGetoptArgs(), PEAR_Command\getHelp(), PEAR_Command_Common\getHelp(), PEAR_Command_Common\getHelpArgs(), TplAestan\getItemPowerShell(), PEAR_Command\getObject(), PEAR_Command_Common\getOptions(), PEAR_Command_Common\getShortcuts(), ActionDebugBase\isSyntaxCheckCommand(), PEAR_Frontend\outputData(), PEAR_Frontend_CLI\outputData(), PEAR_Command\registerCommands(), PEAR_Command_Common\run(), CommandRunner\shellExec(), PEAR_Frontend\userDialog(), and PEAR_Frontend_CLI\userDialog().
| $config = &PEAR_Config::singleton($pear_user_config, $pear_system_config) |
Definition at line 182 of file pearcmd.php.
Referenced by ActionDebugBase\__construct(), PEAR_Dependency2\__construct(), PEAR_PackageFile\__construct(), PEAR_REST_10\__construct(), PEAR_REST_11\__construct(), cmdHelp(), PEAR_Frontend_CLI\displayFatalError(), PEAR_Command\factory(), PEAR_Installer_Role\factory(), PEAR_Command\getObject(), PEAR_Installer_Role\initializeConfig(), PEAR_DependencyDB\setConfig(), PEAR_Frontend\setConfig(), PEAR_PackageFile_v1\setConfig(), PEAR_PackageFile_v2\setConfig(), PEAR_Registry\setConfig(), and PEAR_DependencyDB\singleton().
| $fetype = 'CLI' |
Definition at line 152 of file pearcmd.php.
| $options = Console_Getopt::getopt2($argv, "c:C:d:D:Gh?sSqu:vV") |
Definition at line 145 of file pearcmd.php.
Referenced by PEAR_Downloader\__construct(), PEAR_Downloader_Package\__construct(), PEAR_Error\__construct(), PEAR_REST\__construct(), PEAR_REST_10\__construct(), PEAR_REST_11\__construct(), PEAR_RunTest\__construct(), PEAR_Downloader_Package\_analyzeDownloadURL(), PEAR_Downloader_Package\_detect1(), PEAR_Downloader_Package\_detect2(), PEAR_Downloader_Package\_detect2Dep(), PEAR_Command_Registry\_doInfo2(), PEAR_Downloader_Package\_fromFile(), PEAR_Downloader_Package\_fromString(), PEAR_Downloader_Package\_fromUrl(), PEAR_Installer\_installFile(), PEAR_Installer\_installFile2(), PEAR_Builder\_parseConfigureOptions(), PEAR\_popErrorHandling(), PEAR\_pushErrorHandling(), PEAR\_raiseError(), PEAR\_setErrorHandling(), PEAR_Command_Package\_svnRemoveTag(), BinMysql\changeRootPassword(), BinMysql\checkPort(), BinMysql\checkRootPassword(), PEAR_Downloader_Package\detectDependencies(), PEAR_Command_Channels\doAdd(), PEAR_Command_Channels\doAlias(), PEAR_Command_Build\doBuild(), PEAR_Command_Install\doBundle(), PEAR_Command_Remote\doClearCache(), PEAR_Command_Config\doConfigCreate(), PEAR_Command_Config\doConfigGet(), PEAR_Command_Config\doConfigHelp(), PEAR_Command_Config\doConfigSet(), PEAR_Command_Config\doConfigShow(), PEAR_Command_Package\doConvert(), PEAR_Command_Package\doCvsDiff(), PEAR_Command_Package\doCvsTag(), PEAR_Command_Channels\doDelete(), PEAR_Command_Channels\doDiscover(), PEAR_Command_Remote\doDownload(), PEAR_Command_Mirror\doDownloadAll(), PEAR_Command_Registry\doFileList(), PEAR_Command_Channels\doInfo(), PEAR_Command_Registry\doInfo(), PEAR_Command_Install\doInstall(), PEAR_Command_Channels\doList(), PEAR_Command_Registry\doList(), PEAR_Command_Registry\doListAll(), PEAR_Command_Remote\doListAll(), PEAR_Command_Remote\doListUpgrades(), PEAR_Command_Channels\doLogin(), PEAR_Command_Channels\doLogout(), PEAR_Command_Package\doMakeRPM(), PEAR_Command_Package\doPackage(), PEAR_Command_Pickle\doPackage(), PEAR_Command_Package\doPackageDependencies(), PEAR_Command_Package\doPackageValidate(), PEAR_Command_Remote\doRemoteInfo(), PEAR_Command_Remote\doRemoteList(), PEAR_Command_Install\doRunScripts(), PEAR_Command_Test\doRunTests(), PEAR_Command_Remote\doSearch(), PEAR_Command_Registry\doShellTest(), PEAR_Command_Package\doSign(), PEAR_Command_Package\doSvnTag(), PEAR_Command_Install\doUninstall(), PEAR_Command_Channels\doUpdate(), PEAR_Command_Channels\doUpdateAll(), PEAR_Command_Install\doUpgradeAll(), PEAR_Downloader_Package\fromDepURL(), PEAR_Command_Install\getDownloader(), PEAR_Command_Remote\getDownloader(), PEAR_Downloader_Package\initialize(), PEAR_Installer\install(), PEAR_Downloader_Package\isInstalled(), PEAR_Downloader_Package\mergeDependencies(), PEAR_Error\PEAR_Error(), PEAR_Downloader_Package\removeInstalled(), PEAR_Command_Common\run(), PEAR_Downloader\setOptions(), PEAR_Installer\setOptions(), PEAR\staticPopErrorHandling(), PEAR\staticPushErrorHandling(), and PEAR_Installer\uninstall().
| if (PEAR::isError( $options)) $opts = $options[0] |
Definition at line 150 of file pearcmd.php.
Referenced by Console_Getopt\_parseLongOption(), Console_Getopt\_parseShortOption(), PEAR_Command_Install\doBundle(), Console_Getopt\doGetopt(), System\mkDir(), System\mktemp(), PEAR_Frontend_CLI\outputData(), and System\rm().
| $pear_package_version = "1.10.18" |
Definition at line 125 of file pearcmd.php.
| $pear_system_config = '' |
Definition at line 164 of file pearcmd.php.
| $pearDir = Path::getPearPath() . '/pear' |
Definition at line 31 of file pearcmd.php.
Referenced by bearsamppRelocatePearRegistry().
| if (php_sapi_name() !='cli' &&isset( $argv[1]) &&$argv[1]=='--') $progname = PEAR_RUNTYPE |
Definition at line 143 of file pearcmd.php.
| $raw = false |
Definition at line 116 of file pearcmd.php.
Referenced by PEAR_Installer\_installFile2(), PEAR_PackageFile_v2\getDeps(), PEAR_PackageFile_v2\getLicense(), PEAR_PackageFile_v2\getMaintainers(), PEAR_PackageFile_v2\initPostinstallScripts(), PEAR_PackageFile_v2\listPostinstallScripts(), and PEAR_PackageFile_Generator_v2\toTgz2().
| $store_system_config = false |
Definition at line 166 of file pearcmd.php.
| $store_user_config = false |
Definition at line 165 of file pearcmd.php.
| $ui = &PEAR_Command::getFrontendObject() |
Definition at line 181 of file pearcmd.php.
Referenced by PEAR_Registry\_addPackage2(), PEAR_Command\factory(), PEAR_Command\getObject(), PEAR_REST_10\listAll(), and PEAR_PackageFile_v2\runPostinstallScripts().
| $verbose = 1 |
Definition at line 167 of file pearcmd.php.
Referenced by PEAR_Command_Remote\doClearCache(), TplAppLogsVerbose\getActionSwitchLogsVerbose(), TplAppLogsVerbose\getMenuLogsVerbose(), PEAR_PackageFile_v2\installBinary(), and Log\write().
| const PEAR_IGNORE_BACKTRACE(!defined( 'PEAR_RUNTYPE')) | ( | ! | defined 'PEAR_RUNTYPE' | ) | 1 |
Definition at line 23 of file pearcmd.php.