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

Class: PEAR_Frontend_CLI

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

Class Overview

PEAR
   |
   --PEAR_Frontend_CLI

Base class for other PEAR classes. Provides rudimentary emulation of destructors.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

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 24]
Base class for other PEAR classes. Provides rudimentary emulation of destructors.

If you want a destructor in your class, inherit PEAR and make a destructor method called _yourclassname (same name as the constructor, but with a "_" prefix). Also, in your constructor you have to call the PEAR constructor: $this->PEAR();. The destructor method will be called without parameters. Note that at in some SAPI implementations (such as Apache), any output during the request shutdown (in which destructors are called) seems to be discarded. If you need to get any debug information from your destructor, use error_log(), syslog() or something similar.

IMPORTANT! To use the emulated destructors you need to create the objects by reference: $obj =& new PEAR_child;



[ Top ]


Class Variables

$lp =  ''

[line 34]


Type:   mixed


[ Top ]

$params = array()

[line 36]


Type:   mixed


[ Top ]

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

[line 37]


Type:   mixed


[ Top ]

$type =  'CLI'

[line 33]

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

Type:   string


[ Top ]



Method Detail

PEAR_Frontend_CLI (Constructor)   [line 46]

PEAR_Frontend_CLI PEAR_Frontend_CLI( )


[ Top ]

bold   [line 498]

void bold( $text)


Parameters:

   $text   — 

[ Top ]

display   [line 83]

void display( $text)


Parameters:

   $text   — 

[ Top ]

displayError   [line 99]

void displayError( object PEAR_Error $eobj)


Parameters:

object PEAR_Error   $eobj   —  object

[ Top ]

displayFatalError   [line 110]

void displayFatalError( object PEAR_Error $eobj)


Parameters:

object PEAR_Error   $eobj   —  object

[ Top ]

displayHeading   [line 119]

void displayHeading( $title)


Parameters:

   $title   — 

[ Top ]

displayLine   [line 70]

void displayLine( $text)


Parameters:

   $text   — 

[ Top ]

endTable   [line 263]

void endTable( )


[ Top ]

log   [line 486]

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


Parameters:

   $text   — 
   $append_crlf   — 

[ Top ]

outputData   [line 369]

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


Parameters:

   $data   — 
   $command   — 

[ Top ]

startTable   [line 196]

void startTable( [ $params = array()])


Parameters:

   $params   — 

[ Top ]

tableRow   [line 213]

void tableRow( $columns, [ $rowparams = array()], [ $colparams = array()])


Parameters:

   $columns   — 
   $rowparams   — 
   $colparams   — 

[ Top ]

userConfirm   [line 168]

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


Parameters:

   $prompt   — 
   $default   — 

[ Top ]

userDialog   [line 133]

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


Parameters:

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

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:23:54 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.