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

Class: PEAR_Frontend_CLI

Source Location: /PEAR-1.10.0dev2/PEAR/Frontend/CLI.php

Class Overview

PEAR
   |
   --PEAR_Frontend
      |
      --PEAR_Frontend_CLI

Command-line Frontend for the PEAR Installer


Author(s):

Version:

  • Release: 1.10.0dev2

Copyright:

  • 1997-2009 The Authors

Variables

Methods


Inherited Variables

Inherited Methods

Class: PEAR_Frontend

PEAR_Frontend::addTempFile()
This can be overridden to allow session-based temporary file management
PEAR_Frontend::isIncludeable()
PEAR_Frontend::log()
Log an action
PEAR_Frontend::outputData()
Display human-friendly output formatted depending on the $command parameter.
PEAR_Frontend::runPostinstallScripts()
Run a post-installation script
PEAR_Frontend::setConfig()
PEAR_Frontend::setFrontendClass()
Set the frontend class that will be used by calls to singleton()
PEAR_Frontend::setFrontendObject()
Set the frontend class that will be used by calls to singleton()
PEAR_Frontend::singleton()
Retrieve the frontend object
PEAR_Frontend::userDialog()
Display a modal form dialog and return the given input

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 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 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 33]
Command-line Frontend for the PEAR Installer


[ Top ]


Class Variables

$lp =  ''

[line 41]


Type:   mixed


[ Top ]

$params = array()

[line 43]


Type:   mixed


[ Top ]

$term = array(
        'bold'   => '',
        'normal' => '',
    )

[line 44]


Type:   mixed


[ Top ]

$type =  'CLI'

[line 40]

What type of user interface this frontend is for.
  • Access: public

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 49]

PEAR_Frontend_CLI __construct( )


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

bold   [line 553]

void bold( $text)


Parameters:

   $text   — 

[ Top ]

confirmDialog   [line 255]

array confirmDialog( array $params)

Ask for user input, confirm the answers and continue until the user is satisfied

Parameters:

array   $params   —  an array of arrays, format array('name' => 'paramname', 'prompt' => 'text to display', 'type' => 'string'[, default => 'default value'])

[ Top ]

displayError   [line 71]

void displayError( object PEAR_Error $e)


Parameters:

object PEAR_Error   $e   —  object

[ Top ]

displayFatalError   [line 79]

void displayFatalError( object PEAR_Error $eobj)


Parameters:

object PEAR_Error   $eobj   —  object

[ Top ]

log   [line 544]

void log( $text, [ $append_crlf = true])


Overrides PEAR_Frontend::log() (Log an action)

Parameters:

   $text   — 
   $append_crlf   — 

[ Top ]

outputData   [line 383]

void outputData( $data, [ $command = '_default'])


Overrides PEAR_Frontend::outputData() (Display human-friendly output formatted depending on the $command parameter.)

Parameters:

   $data   — 
   $command   — 

[ Top ]

runInstallScript   [line 141]

void runInstallScript( array $xml, &$script, object $script, string 2)


Parameters:

array   $xml   —  contents of postinstallscript tag
object   $script   —  post-installation script
string   2   —  install|upgrade
   &$script   — 

[ Top ]

runPostinstallScripts   [line 129]

void runPostinstallScripts( &$scripts)


Overrides PEAR_Frontend::runPostinstallScripts() (Run a post-installation script)

Parameters:

   &$scripts   — 

[ Top ]

skipParamgroup   [line 124]

void skipParamgroup( string $id)

Instruct the runInstallScript method to skip a paramgroup that matches the id value passed in.

This method is useful for dynamically configuring which sections of a post-install script will be run based on the user's setup, which is very useful for making flexible post-install scripts without losing the cross-Frontend ability to retrieve user input


Parameters:

string   $id   — 

[ Top ]

userConfirm   [line 358]

void userConfirm( $prompt, [ $default = 'yes'])


Parameters:

   $prompt   — 
   $default   — 

[ Top ]

userDialog   [line 283]

void userDialog( $command, $prompts, [ $types = array()], [ $defaults = array()], [ $screensize = 20])


Overrides PEAR_Frontend::userDialog() (Display a modal form dialog and return the given input)

Parameters:

   $command   — 
   $prompts   — 
   $types   — 
   $defaults   — 
   $screensize   — 

[ Top ]


Documentation generated on Fri, 31 Jul 2015 09:30:20 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.