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

Class: PEAR_Command_Common

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

Class Overview

PEAR
   |
   --PEAR_Command_Common

PEAR commands base class


Author(s):

Version:

  • Release: 1.10.12

Copyright:

  • 1997-2009 The Authors

Variables

Methods


Child classes:

PEAR_Command_Package
PEAR commands for login/logout
PEAR_Command_Pickle
PEAR commands for login/logout
PEAR_Command_Test
PEAR commands for login/logout
PEAR_Command_Build
PEAR commands for building extensions.
PEAR_Command_Remote
PEAR commands for remote server querying
PEAR_Command_Config
PEAR commands for managing configuration data.
PEAR_Command_Registry
PEAR commands for registry manipulation
PEAR_Command_Channels
PEAR commands for managing channels.
PEAR_Command_Install
PEAR commands for installation or deinstallation/upgrading of packages.
PEAR_Command_Mirror
PEAR commands for providing file mirrors

Inherited Variables

Inherited Methods

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 35]
PEAR commands base class


[ Top ]


Class Variables

$config =

[line 43]

PEAR_Config object used to pass user system and configuration on when executing commands

Type:   PEAR_Config


[ Top ]

$ui =

[line 54]

User Interface object, for all interaction with the user.

Type:   object


[ Top ]

$_registry =

[line 48]

  • Access: protected

Type:   PEAR_Registry


[ Top ]



Method Detail

__construct (Constructor)   [line 83]

PEAR_Command_Common __construct( &$ui, &$config)

PEAR_Command_Common constructor.
  • Access: public

Overridden in child classes as:

PEAR_Command_Package::__construct()
PEAR_Command_Package constructor.
PEAR_Command_Pickle::__construct()
PEAR_Command_Package constructor.
PEAR_Command_Test::__construct()
PEAR_Command_Test constructor.
PEAR_Command_Build::__construct()
PEAR_Command_Build constructor.
PEAR_Command_Remote::__construct()
PEAR_Command_Remote constructor.
PEAR_Command_Config::__construct()
PEAR_Command_Config constructor.
PEAR_Command_Registry::__construct()
PEAR_Command_Registry constructor.
PEAR_Command_Channels::__construct()
PEAR_Command_Registry constructor.
PEAR_Command_Auth::__construct()
PEAR_Command_Auth constructor.
PEAR_Command_Install::__construct()
PEAR_Command_Install constructor.
PEAR_Command_Mirror::__construct()
PEAR_Command_Mirror constructor.

Overrides PEAR::__construct() (Constructor. Registers this object in $_PEAR_destructor_object_list for destructor emulation if a destructor object exists.)

Parameters:

   &$ui   — 
   &$config   — 

[ Top ]

getCommands   [line 95]

array getCommands( )

Return a list of all the commands defined by this class.
  • Return: list of commands
  • Access: public

[ Top ]

getGetoptArgs   [line 137]

void getGetoptArgs( $command, &$short_args, &$long_args)


Parameters:

   $command   — 
   &$short_args   — 
   &$long_args   — 

[ Top ]

getHelp   [line 176]

mixed getHelp( string $command)

Returns the help message for the given command
  • Return: A fail string if the command does not have help or a two elements array containing [0]=>help string, [1]=> help string for the accepted cmd args

Parameters:

string   $command   —  The command

[ Top ]

getHelpArgs   [line 211]

string getHelpArgs( string $command)

Returns the help for the accepted arguments of a command
  • Return: The help string

Parameters:

string   $command   — 

[ Top ]

getOptions   [line 122]

void getOptions( $command)


Parameters:

   $command   — 

[ Top ]

getShortcuts   [line 110]

array getShortcuts( )

Return a list of all the command shortcuts defined by this class.
  • Return: shortcut => command
  • Access: public

[ Top ]

run   [line 249]

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


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]


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