PEAR
[ class tree: PEAR ] [ index: PEAR ] [ all elements ]

Class: PEAR_Command_Install

Source Location: /PEAR-1.10.12/PEAR/Command/Install.php

Class Overview

PEAR
   |
   --PEAR_Command_Common
      |
      --PEAR_Command_Install

PEAR commands for installation or deinstallation/upgrading of packages.


Author(s):

Version:

  • Release: 1.10.12

Copyright:

  • 1997-2009 The Authors

Variables

Methods


Inherited Variables

Inherited Methods

Class: PEAR_Command_Common

PEAR_Command_Common::__construct()
PEAR_Command_Common constructor.
PEAR_Command_Common::getCommands()
Return a list of all the commands defined by this class.
PEAR_Command_Common::getGetoptArgs()
PEAR_Command_Common::getHelp()
Returns the help message for the given command
PEAR_Command_Common::getHelpArgs()
Returns the help for the accepted arguments of a command
PEAR_Command_Common::getOptions()
PEAR_Command_Common::getShortcuts()
Return a list of all the command shortcuts defined by this class.
PEAR_Command_Common::run()

Class: PEAR

PEAR::__construct()
Constructor. Registers this object in $_PEAR_destructor_object_list for destructor emulation if a destructor object exists.
PEAR::PEAR()
Only here for backwards compatibility.
PEAR::delExpect()
This method deletes all occurrences of the specified element from the expected error codes stack.
PEAR::expectError()
This method is used to tell which errors you expect to get.
PEAR::getSourceDateEpoch()
Get SOURCE_DATE_EPOCH environment variable See https://reproducible-builds.org/specs/source-date-epoch/
PEAR::getStaticProperty()
If you have a class that's mostly/entirely static, and you need static
PEAR::isError()
Tell whether a value is a PEAR error.
PEAR::loadExtension()
OS independent PHP extension load. Remember to take care on the correct extension name for case sensitive OSes.
PEAR::popExpect()
This method pops one element off the expected error codes stack.
PEAR::registerShutdownFunc()
Use this function to register a shutdown method for static classes.
PEAR::staticPopErrorHandling()
PEAR::staticPushErrorHandling()
PEAR::_PEAR()
Destructor (the emulated type of...). Does nothing right now, but is included for forward compatibility, so subclass destructors should always call it.
PEAR::_popErrorHandling()
Pop the last error handler used
PEAR::_pushErrorHandling()
Push a new error handler on top of the error handler options stack. With this you can easily override the actual error handler for some code and restore it later with popErrorHandling.
PEAR::_raiseError()
This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied. If the $mode and $options parameters are not specified, the object's defaults are used.
PEAR::_setErrorHandling()
Sets how errors generated by this object should be handled.
PEAR::_throwError()
Simpler form of raiseError with fewer options. In most cases message, code and userinfo are enough.
PEAR::__call()
PEAR::__callStatic()

Class Details

[line 36]
PEAR commands for installation or deinstallation/upgrading of packages.


[ Top ]


Class Variables

$commands = array(
        'install' => array(
            'summary' => 'Install Package',
            'function' => 'doInstall',
            'shortcut' => 'i',
            'options' => array(
                'force' => array(
                    'shortopt' => 'f',
                    'doc' => 'will overwrite newer installed packages',
                    ),'loose'=>array('shortopt'=>'l','doc'=>'do not check for recommended dependency version',),'nodeps'=>array('shortopt'=>'n','doc'=>'ignore dependencies, install anyway',),'register-only'=>array('shortopt'=>'r','doc'=>'do not install files, only register the package as installed',),'soft'=>array('shortopt'=>'s','doc'=>'soft install, fail silently, or upgrade if already installed',),'nobuild'=>array('shortopt'=>'B','doc'=>'don\'t build C extensions',),'configureoptions'=>array('shortopt'=>'D','arg'=>'OPTION1=VALUE[ OPTION2=VALUE]','doc'=>'space-delimited list of configure options',),'nocompress'=>array('shortopt'=>'Z','doc'=>'request uncompressed files when downloading',),'installroot'=>array('shortopt'=>'R','arg'=>'DIR','doc'=>'root directory used when installing files (ala PHP\'s INSTALL_ROOT), use packagingroot for RPM',),'packagingroot'=>array('shortopt'=>'P','arg'=>'DIR','doc'=>'root directory used when packaging files, like RPM packaging',),'ignore-errors'=>array('doc'=>'force install even if there were errors',),'alldeps'=>array('shortopt'=>'a','doc'=>'install all required and optional dependencies',),'onlyreqdeps'=>array('shortopt'=>'o','doc'=>'install all required dependencies',),'offline'=>array('shortopt'=>'O','doc'=>'do not attempt to download any urls or contact channels',),'pretend'=>array('shortopt'=>'p','doc'=>'Only list the packages that would be downloaded',),),'doc'=>'[channel/]<package> ...
Installs one or more PEAR packages.  You can specify a package to
install in four ways:

"Package-1.0.tgz" : installs from a local file

"http://example.com/Package-1.0.tgz" : installs from
anywhere on the net.

"package.xml" : installs the package described in
package.xml.  Useful for testing, or for wrapping a PEAR package in
another package manager such as RPM.

"Package[-version/state][.tar]" : queries your default channel\'s server
({config master_server}) and downloads the newest package with
the preferred quality/state ({config preferred_state}).

To retrieve Package version 1.1, use "Package-1.1," to retrieve
Package state beta, use "Package-beta."  To retrieve an uncompressed
file, append .tar (make sure there is no file by the same name first)

To download a package from another channel, prefix with the channel name like
"channel/Package"

More than one package may be specified at once.  It is ok to mix these
four ways of specifying packages.
'),'upgrade'=>array('summary'=>'Upgrade Package','function'=>'doInstall','shortcut'=>'up','options'=>array('channel'=>array('shortopt'=>'c','doc'=>'upgrade packages from a specific channel','arg'=>'CHAN',),'force'=>array('shortopt'=>'f','doc'=>'overwrite newer installed packages',),'loose'=>array('shortopt'=>'l','doc'=>'do not check for recommended dependency version',),'nodeps'=>array('shortopt'=>'n','doc'=>'ignore dependencies, upgrade anyway',),'register-only'=>array('shortopt'=>'r','doc'=>'do not install files, only register the package as upgraded',),'nobuild'=>array('shortopt'=>'B','doc'=>'don\'t build C extensions',),'nocompress'=>array('shortopt'=>'Z','doc'=>'request uncompressed files when downloading',),'installroot'=>array('shortopt'=>'R','arg'=>'DIR','doc'=>'root directory used when installing files (ala PHP\'s INSTALL_ROOT)',),'ignore-errors'=>array('doc'=>'force install even if there were errors',),'alldeps'=>array('shortopt'=>'a','doc'=>'install all required and optional dependencies',),'onlyreqdeps'=>array('shortopt'=>'o','doc'=>'install all required dependencies',),'offline'=>array('shortopt'=>'O','doc'=>'do not attempt to download any urls or contact channels',),'pretend'=>array('shortopt'=>'p','doc'=>'Only list the packages that would be downloaded',),),'doc'=>'<package> ...
Upgrades one or more PEAR packages.  See documentation for the
"install" command for ways to specify a package.

When upgrading, your package will be updated if the provided new
package has a higher version number (use the -f option if you need to
upgrade anyway).

More than one package may be specified at once.
'),'upgrade-all'=>array('summary'=>'Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]','function'=>'doUpgradeAll','shortcut'=>'ua','options'=>array('channel'=>array('shortopt'=>'c','doc'=>'upgrade packages from a specific channel','arg'=>'CHAN',),'nodeps'=>array('shortopt'=>'n','doc'=>'ignore dependencies, upgrade anyway',),'register-only'=>array('shortopt'=>'r','doc'=>'do not install files, only register the package as upgraded',),'nobuild'=>array('shortopt'=>'B','doc'=>'don\'t build C extensions',),'nocompress'=>array('shortopt'=>'Z','doc'=>'request uncompressed files when downloading',),'installroot'=>array('shortopt'=>'R','arg'=>'DIR','doc'=>'root directory used when installing files (ala PHP\'s INSTALL_ROOT), use packagingroot for RPM',),'ignore-errors'=>array('doc'=>'force install even if there were errors',),'loose'=>array('doc'=>'do not check for recommended dependency version',),),'doc'=>'
WARNING: This function is deprecated in favor of using the upgrade command with no params

Upgrades all packages that have a newer release available.  Upgrades are
done only if there is a release available of the state specified in
"preferred_state" (currently {config preferred_state}), or a state considered
more stable.
'),'uninstall'=>array('summary'=>'Un-install Package','function'=>'doUninstall','shortcut'=>'un','options'=>array('nodeps'=>array('shortopt'=>'n','doc'=>'ignore dependencies, uninstall anyway',),'register-only'=>array('shortopt'=>'r','doc'=>'do not remove files, only register the packages as not installed',),'installroot'=>array('shortopt'=>'R','arg'=>'DIR','doc'=>'root directory used when installing files (ala PHP\'s INSTALL_ROOT)',),'ignore-errors'=>array('doc'=>'force install even if there were errors',),'offline'=>array('shortopt'=>'O','doc'=>'do not attempt to uninstall remotely',),),'doc'=>'[channel/]<package> ...
Uninstalls one or more PEAR packages.  More than one package may be
specified at once.  Prefix with channel name to uninstall from a
channel not in your default channel ({config default_channel})
'),'bundle'=>array('summary'=>'Unpacks a Pecl Package','function'=>'doBundle','shortcut'=>'bun','options'=>array('destination'=>array('shortopt'=>'d','arg'=>'DIR','doc'=>'Optional destination directory for unpacking (defaults to current path or "ext" if exists)',),'force'=>array('shortopt'=>'f','doc'=>'Force the unpacking even if there were errors in the package',),),'doc'=>'<package>
Unpacks a Pecl Package into the selected location. It will download the
package if needed.
'),'run-scripts'=>array('summary'=>'Run Post-Install Scripts bundled with a package','function'=>'doRunScripts','shortcut'=>'rs','options'=>array(),'doc'=>'<package>
Run post-installation scripts in package <package>, if any exist.
'),)

[line 40]


Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 320]

PEAR_Command_Install __construct( &$ui, &$config)

PEAR_Command_Install constructor.
  • Access: public

Overrides PEAR_Command_Common::__construct() (PEAR_Command_Common constructor.)

Parameters:

   &$ui   — 
   &$config   — 

[ Top ]

disableExtension   [line 404]

void disableExtension( $binaries, $type)


Parameters:

   $binaries   — 
   $type   — 

[ Top ]

doBundle   [line 1098]

void doBundle( $command, $options, $params)


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doInstall   [line 528]

void doInstall( $command, $options, $params)


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doRunScripts   [line 1154]

void doRunScripts( $command, $options, $params)


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doUninstall   [line 916]

void doUninstall( $command, $options, $params)


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doUpgradeAll   [line 882]

void doUpgradeAll( $command, $options, $params)


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

enableExtension   [line 351]

void enableExtension( $binaries, $type)


Parameters:

   $binaries   — 
   $type   — 

[ Top ]

getDownloader   [line 330]

void &getDownloader( &$ui, $options, &$config)

For unit testing purposes

Parameters:

   &$ui   — 
   $options   — 
   &$config   — 

[ Top ]

getInstaller   [line 342]

void &getInstaller( &$ui)

For unit testing purposes

Parameters:

   &$ui   — 

[ Top ]


Documentation generated on Sun, 19 Apr 2020 14:22:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.