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

Class: PEAR_Command_Channels

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

Class Overview

PEAR
   |
   --PEAR_Command_Common
      |
      --PEAR_Command_Channels

PEAR commands for managing channels.


Author(s):

Version:

  • Release: 1.10.12

Copyright:

  • 1997-2009 The Authors

Variables

Methods


Child classes:

PEAR_Command_Auth
PEAR commands for login/logout

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 38]
PEAR commands for managing channels.


[ Top ]


Class Variables

$commands = array(
        'list-channels' => array(
            'summary' => 'List Available Channels',
            'function' => 'doList',
            'shortcut' => 'lc',
            'options' => array(),'doc'=>'
List all available channels for installation.
',),'update-channels'=>array('summary'=>'Update the Channel List','function'=>'doUpdateAll','shortcut'=>'uc','options'=>array(),'doc'=>'
List all installed packages in all channels.
'),'channel-delete'=>array('summary'=>'Remove a Channel From the List','function'=>'doDelete','shortcut'=>'cde','options'=>array(),'doc'=>'<channel name>
Delete a channel from the registry.  You may not
remove any channel that has installed packages.
'),'channel-add'=>array('summary'=>'Add a Channel','function'=>'doAdd','shortcut'=>'ca','options'=>array(),'doc'=>'<channel.xml>
Add a private channel to the channel list.  Note that all
public channels should be synced using "update-channels".
Parameter may be either a local file or remote URL to a
channel.xml.
'),'channel-update'=>array('summary'=>'Update an Existing Channel','function'=>'doUpdate','shortcut'=>'cu','options'=>array('force'=>array('shortopt'=>'f','doc'=>'will force download of new channel.xml if an existing channel name is used',),'channel'=>array('shortopt'=>'c','arg'=>'CHANNEL','doc'=>'will force download of new channel.xml if an existing channel name is used',),),'doc'=>'[<channel.xml>|<channel name>]
Update a channel in the channel list directly.  Note that all
public channels can be synced using "update-channels".
Parameter may be a local or remote channel.xml, or the name of
an existing channel.
'),'channel-info'=>array('summary'=>'Retrieve Information on a Channel','function'=>'doInfo','shortcut'=>'ci','options'=>array(),'doc'=>'<package>
List the files in an installed package.
'),'channel-alias'=>array('summary'=>'Specify an alias to a channel name','function'=>'doAlias','shortcut'=>'cha','options'=>array(),'doc'=>'<channel> <alias>
Specify a specific alias to use for a channel name.
The alias may not be an existing channel name or
alias.
'),'channel-discover'=>array('summary'=>'Initialize a Channel from its server','function'=>'doDiscover','shortcut'=>'di','options'=>array(),'doc'=>'[<channel.xml>|<channel name>]
Initialize a channel from its server and create a local channel.xml.
If <channel name> is in the format "<username>:<password>@<channel>" then
<username> and <password> will be set as the login username/password for
<channel>. Use caution when passing the username/password in this way, as
it may allow other users on your computer to briefly view your username/
password via the system\'s process list.
'),'channel-login'=>array('summary'=>'Connects and authenticates to remote channel server','shortcut'=>'cli','function'=>'doLogin','options'=>array(),'doc'=>'<channel name>
Log in to a remote channel server.  If <channel name> is not supplied,
the default channel is used. To use remote functions in the installer
that require any kind of privileges, you need to log in first.  The
username and password you enter here will be stored in your per-user
PEAR configuration (~/.pearrc on Unix-like systems).  After logging
in, your username and password will be sent along in subsequent
operations on the remote server.',),'channel-logout'=>array('summary'=>'Logs out from the remote channel server','shortcut'=>'clo','function'=>'doLogout','options'=>array(),'doc'=>'<channel name>
Logs out from a remote channel server.  If <channel name> is not supplied,
the default channel is used. This command does not actually connect to the
remote server, it only deletes the stored username and password from your user
configuration.',),)

[line 40]


Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 169]

PEAR_Command_Channels __construct( &$ui, &$config)

PEAR_Command_Registry constructor.
  • Access: public

Overridden in child classes as:

PEAR_Command_Auth::__construct()
PEAR_Command_Auth constructor.

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

Parameters:

   &$ui   — 
   &$config   — 

[ Top ]

doAdd   [line 408]

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


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doAlias   [line 670]

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


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doDelete   [line 363]

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


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doDiscover   [line 725]

null|PEAR_Error doDiscover( string $command, array $options, array $params)

The channel-discover command

Parameters:

string   $command   —  command name
array   $options   —  option_name => value
array   $params   —  list of additional parameters. $params[0] should contain a string with either:
  • <channel name> or
  • <username>:<password>@<channel name>

[ Top ]

doInfo   [line 226]

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


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doList   [line 179]

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


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doLogin   [line 797]

bool doLogin( string $command, array $options, array $params)

Execute the 'login' command.
  • Return: TRUE on success or a PEAR error on failure
  • Access: public

Parameters:

string   $command   —  command name
array   $options   —  option_name => value
array   $params   —  list of additional parameters

[ Top ]

doLogout   [line 863]

bool doLogout( string $command, array $options, array $params)

Execute the 'logout' command.
  • Return: TRUE on success or a PEAR error on failure
  • Access: public

Parameters:

string   $command   —  command name
array   $options   —  option_name => value
array   $params   —  list of additional parameters

[ Top ]

doUpdate   [line 506]

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


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doUpdateAll   [line 203]

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


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

getDownloader   [line 661]

void &getDownloader( )


[ Top ]


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