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

Class: PEAR_Command_Install

Source Location: /PEAR-1.9.4/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.9.4

Copyright:

  • 1997-2009 The Authors

Variables

Methods


Inherited Variables

Inherited Methods

Class: PEAR_Command_Common

PEAR_Command_Common::PEAR_Command_Common()
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::PEAR()
Constructor. Registers this object in $_PEAR_destructor_object_list for destructor emulation if a destructor object exists.
PEAR::delExpect()
This method deletes all occurences 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::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 independant PHP extension load. Remember to take care on the correct extension name for case sensitive OSes.
PEAR::popErrorHandling()
Pop the last error handler used
PEAR::popExpect()
This method pops one element off the expected error codes stack.
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::registerShutdownFunc()
Use this function to register a shutdown method for static classes.
PEAR::setErrorHandling()
Sets how errors generated by this object should be handled.
PEAR::staticPopErrorHandling()
PEAR::staticPushErrorHandling()
PEAR::throwError()
Simpler form of raiseError with fewer options. In most cases message, code and userinfo are enough.
PEAR::_PEAR()
Destructor (the emulated type of...). Does nothing right now, but is included for forward compatibility, so subclass destructors should always call it.

Class Details

[line 37]
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',),'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 41]


Type:   mixed


[ Top ]



Method Detail

PEAR_Command_Install (Constructor)   [line 316]

PEAR_Command_Install PEAR_Command_Install( &$ui, &$config)

PEAR_Command_Install constructor.
  • Access: public

Parameters:

   &$ui     
   &$config     

[ Top ]

disableExtension   [line 400]

void disableExtension( $binaries, $type)


Parameters:

   $binaries     
   $type     

[ Top ]

doBundle   [line 1093]

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


Parameters:

   $command     
   $options     
   $params     

[ Top ]

doInstall   [line 524]

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


Parameters:

   $command     
   $options     
   $params     

[ Top ]

doRunScripts   [line 1149]

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


Parameters:

   $command     
   $options     
   $params     

[ Top ]

doUninstall   [line 911]

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


Parameters:

   $command     
   $options     
   $params     

[ Top ]

doUpgradeAll   [line 877]

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


Parameters:

   $command     
   $options     
   $params     

[ Top ]

enableExtension   [line 347]

void enableExtension( $binaries, $type)


Parameters:

   $binaries     
   $type     

[ Top ]

getDownloader   [line 326]

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

For unit testing purposes

Parameters:

   &$ui     
   $options     
   &$config     

[ Top ]

getInstaller   [line 338]

void &getInstaller( &$ui)

For unit testing purposes

Parameters:

   &$ui     

[ Top ]


Documentation generated on Wed, 06 Jul 2011 23:30:52 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.