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

Class: PEAR_Frontend_CLI

Source Location: /PEAR-1.9.5/PEAR/Frontend/CLI.php

Class Overview

PEAR
   |
   --PEAR_Frontend
      |
      --PEAR_Frontend_CLI

Command-line Frontend for the PEAR Installer


Author(s):

Version:

  • Release: 1.9.5

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


[ Top ]


Class Variables

$lp =  ''

[line 42]


Type:   mixed


[ Top ]

$params = array()

[line 44]


Type:   mixed


[ Top ]

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

[line 45]


Type:   mixed


[ Top ]

$type =  'CLI'

[line 41]

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

Type:   string


[ Top ]



Method Detail

PEAR_Frontend_CLI (Constructor)   [line 50]

PEAR_Frontend_CLI PEAR_Frontend_CLI( )


[ Top ]

bold   [line 554]

void bold( $text)


Parameters:

   $text     

[ Top ]

confirmDialog   [line 256]

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 72]

void displayError( object PEAR_Error $e)


Parameters:

object PEAR_Error   $e     object

[ Top ]

displayFatalError   [line 80]

void displayFatalError( object PEAR_Error $eobj)


Parameters:

object PEAR_Error   $eobj     object

[ Top ]

log   [line 545]

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


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

Parameters:

   $text     
   $append_crlf     

[ Top ]

outputData   [line 384]

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 142]

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 130]

void runPostinstallScripts( &$scripts)


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

Parameters:

   &$scripts     

[ Top ]

skipParamgroup   [line 125]

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 359]

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


Parameters:

   $prompt     
   $default     

[ Top ]

userDialog   [line 284]

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 Sat, 12 Jul 2014 14:00:28 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.