![]() |
Bearsampp 2026.9.23
|
Public Member Functions | |
| __construct () | |
| _display ($text) | |
| _displayHeading ($title) | |
| _displayLine ($text) | |
| _endTable () | |
| _startTable ($params=array()) | |
| _tableRow ($columns, $rowparams=array(), $colparams=array()) | |
| bold ($text) | |
| confirmDialog ($params) | |
| displayError ($e) | |
| displayFatalError ($eobj) | |
| log ($text, $append_crlf=true) | |
| outputData ($data, $command='_default') | |
| runInstallScript ($xml, &$script) | |
| runPostinstallScripts (&$scripts) | |
| skipParamgroup ($id) | |
| userConfirm ($prompt, $default='yes') | |
| userDialog ($command, $prompts, $types=array(), $defaults=array(), $screensize=20) | |
| Public Member Functions inherited from PEAR_Frontend | |
| setConfig (&$config) | |
| userDialog ($command, $prompts, $types=array(), $defaults=array()) | |
| Public Member Functions inherited from PEAR | |
| __call ($method, $arguments) | |
| __construct ($error_class=null) | |
| _checkDelExpect ($error_code) | |
| _PEAR () | |
| delExpect ($error_code) | |
| expectError ($code=' *') | |
| PEAR ($error_class=null) | |
| popExpect () | |
Data Fields | |
| $lp = '' | |
| $params = array() | |
| $term | |
| $type = 'CLI' | |
| Data Fields inherited from PEAR | |
| $_debug = false | |
| $_default_error_handler = '' | |
| $_default_error_mode = null | |
| $_default_error_options = null | |
| $_error_class = 'PEAR_Error' | |
| $_expected_errors = array() | |
Additional Inherited Members | |
| Static Public Member Functions inherited from PEAR_Frontend | |
| static | addTempFile ($file) |
| static | isIncludeable ($path) |
| static & | setFrontendClass ($uiclass) |
| static & | setFrontendObject ($uiobject) |
| static & | singleton ($type=null) |
| Static Public Member Functions inherited from PEAR | |
| static | __callStatic ($method, $arguments) |
| static | getSourceDateEpoch () |
| static & | getStaticProperty ($class, $var) |
| static | isError ($data, $code=null) |
| static | loadExtension ($ext) |
| static | registerShutdownFunc ($func, $args=array()) |
| static | staticPopErrorHandling () |
| static | staticPushErrorHandling ($mode, $options=null) |
| Static Protected Member Functions inherited from PEAR | |
| static | _popErrorHandling ($object) |
| static | _pushErrorHandling ($object, $mode, $options=null) |
| static | _raiseError ($object, $message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false) |
| static | _setErrorHandling ( $object, $mode=null, $options=null) |
| static | _throwError ($object, $message=null, $code=null, $userinfo=null) |
| Static Protected Attributes inherited from PEAR | |
| static | $bivalentMethods |
| __construct | ( | ) |
Definition at line 49 of file CLI.php.
References $term.
| _display | ( | $text | ) |
Definition at line 750 of file CLI.php.
Referenced by log(), and runInstallScript().
| _displayHeading | ( | $title | ) |
Definition at line 566 of file CLI.php.
Referenced by _endTable().
| _displayLine | ( | $text | ) |
Definition at line 745 of file CLI.php.
Referenced by _endTable(), displayError(), displayFatalError(), log(), and outputData().
| _endTable | ( | ) |
Definition at line 633 of file CLI.php.
References _displayHeading(), _displayLine(), and bold().
Referenced by outputData().
| _startTable | ( | $params = array() | ) |
Definition at line 572 of file CLI.php.
References $params.
Referenced by outputData().
| _tableRow | ( | $columns, | |
| $rowparams = array(), | |||
| $colparams = array() ) |
Definition at line 581 of file CLI.php.
Referenced by outputData().
| bold | ( | $text | ) |
Definition at line 557 of file CLI.php.
Referenced by _endTable(), and confirmDialog().
| confirmDialog | ( | $params | ) |
Ask for user input, confirm the answers and continue until the user is satisfied
| array | an array of arrays, format array('name' => 'paramname', 'prompt' => 'text to display', 'type' => 'string'[, default => 'default value']) |
Definition at line 255 of file CLI.php.
References $params, bold(), and userDialog().
Referenced by runInstallScript().
| displayError | ( | $e | ) |
| object | PEAR_Error object |
Definition at line 71 of file CLI.php.
References _displayLine().
Referenced by displayFatalError().
| displayFatalError | ( | $eobj | ) |
| object | PEAR_Error object |
Definition at line 79 of file CLI.php.
References $config, _displayLine(), displayError(), and exit.
| log | ( | $msg, | |
| $append_crlf = true ) |
Log an action
| string | $msg | the message to log |
| boolean | $append_crlf |
Reimplemented from PEAR_Frontend.
Definition at line 548 of file CLI.php.
References _display(), and _displayLine().
| outputData | ( | $data, | |
| $command = '_default' ) |
Display human-friendly output formatted depending on the $command parameter.
This should be able to handle basic output data with no command
| mixed | $data | data structure containing the information to display |
| string | $command | command from which this method was called @abstract |
Reimplemented from PEAR_Frontend.
Definition at line 387 of file CLI.php.
References $command, $opts, $type, _displayLine(), _endTable(), _startTable(), _tableRow(), and outputData().
Referenced by outputData(), and runInstallScript().
| runInstallScript | ( | $xml, | |
| & | $script ) |
| array | $xml | contents of postinstallscript tag |
| object | $script | post-installation script |
| string | install|upgrade |
Definition at line 141 of file CLI.php.
References _display(), confirmDialog(), and outputData().
Referenced by runPostinstallScripts().
| runPostinstallScripts | ( | & | $scripts | ) |
Run a post-installation script
| array | $scripts | array of post-install scripts @abstract |
Reimplemented from PEAR_Frontend.
Definition at line 129 of file CLI.php.
References runInstallScript().
| skipParamgroup | ( | $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
| string |
Definition at line 124 of file CLI.php.
| userConfirm | ( | $prompt, | |
| $default = 'yes' ) |
Definition at line 358 of file CLI.php.
References E_USER_ERROR.
| userDialog | ( | $command, | |
| $prompts, | |||
| $types = array(), | |||
| $defaults = array(), | |||
| $screensize = 20 ) |
Definition at line 283 of file CLI.php.
References $command, $result, and $type.
Referenced by confirmDialog().
| $params = array() |
Definition at line 43 of file CLI.php.
Referenced by _startTable(), and confirmDialog().
| $term |
Definition at line 44 of file CLI.php.
Referenced by __construct().
| $type = 'CLI' |
Definition at line 40 of file CLI.php.
Referenced by outputData(), and userDialog().