Introduction

Introduction – Introduction to PEAR_Info

Introduction to PEAR_Info

PEAR_Info obtains and displays information about your current PEAR Install. The PEAR_Info page features an A-Z index for easy searching, aswell as anchors for each package in the form of pkg_Package_Name (i.e. url.tld/pearinfo.php#pkg_PEAR_Info) PEAR_Info also features a full 'PEAR Credits' page, with information about the authors of the packages you currently have installed. PEAR_Info will also display any later versions that are available from PEAR to help keep you up to date.

Using PEAR_Info

<?php
require_once 'PEAR/Info.php';

/*
If you need to set a http_proxy value at run-time that is not set in
your user or system pear configuration file, you can use the
following, this must be called BEFORE instantiating the PEAR_Info object
*/

PEAR_Info::setProxy('your.proxy.here');

/*
Optional pear_dir variable, allows you to choose where your PEAR
install is, in case it's not found
*/

$pear_dir "/path/to/your/pear/files";

/*
Instantiate PEAR_Info object
*/

$info = new PEAR_Info($pear_dir);

/*
Show PEAR_Info output
*/

$info->display();
?>

PEAR_Info options

The output may be customized by passing one or more of the following constants bitwise values summed together in the optional options hash parameter. One can also combine the respective constants or bitwise values together with the or operator.

General page options
Name Value Description
PEAR_INFO_GENERAL 1 The configuration file location, PEAR logo and current install version.
PEAR_INFO_CREDITS 2 A link to PEAR Credits page. See also PEAR_INFO_CREDITS_* constants.
PEAR_INFO_CONFIGURATION 4 All PEAR settings (keys and values).
PEAR_INFO_CHANNELS 8 List available channels
PEAR_INFO_PACKAGES 4080 All package informations. See all others PEAR_INFO_PACKAGES_* constants.
PEAR_INFO_PACKAGES_CHANNEL 2048 Show the package channel
PEAR_INFO_PACKAGES_SUMMARY 1024 A short description of the package
PEAR_INFO_PACKAGES_VERSION 512 Package version with state and release date.
PEAR_INFO_PACKAGES_LICENSE 256 License of the package release
PEAR_INFO_PACKAGES_DESCRIPTION 128 A long description of the package
PEAR_INFO_PACKAGES_DEPENDENCIES 64 Show package dependency list
PEAR_INFO_PACKAGES_XML 32 Tell what PEAR packager and package xml version (1.0 or 2.0) was used to build and install the package.
PEAR_INFO_PACKAGES_UPDATE 16 Show the latest version available. Displayed only if different than current install version.
PEAR_INFO_ALL 4095 Shows all of the above. This is the default value.

Credits page options
Name Value Description
PEAR_INFO_CREDITS_ALL 61440 All credits informations. See all others PEAR_INFO_CREDITS_* constants.
PEAR_INFO_CREDITS_GROUP 4096 Show PEAR Group members list
PEAR_INFO_CREDITS_DOCS 8192 Show PEAR Documentation Team list
PEAR_INFO_CREDITS_WEBSITE 16384 Show PEAR Website Team list
PEAR_INFO_CREDITS_PACKAGES 32768 Show authors (and roles) of package maintainers

Common options
Name Value Description
PEAR_INFO_FULLPAGE 65536 Indicates that a complete stand-alone HTML page needs to be printed including the information indicated by the other flags. This is the default value.

Customize PEAR_Info output

<?php
require_once 'PEAR/Info.php';

/*
Optional resume option, allows you to choose what information to display.
Here we will display a quick list of package (version only) group by channel.
*/

$options = array('resume' => PEAR_INFO_FULLPAGE |
    
PEAR_INFO_GENERAL PEAR_INFO_CHANNELS PEAR_INFO_PACKAGES_VERSION,
    
'channels' => array()
);

/*
Instantiate PEAR_Info object, using PEAR default install configuration
*/

$info = new PEAR_Info(''''''$options);

/*
Set you own presentation size and colors, with a simple style sheet.
*/

$css_file "/path/to/your/file.css";
$info->setStyleSheet($css_file);

/*
Show PEAR_Info output
*/

$info->display();
?>
What is New in version ? (Previous) Reference guide (Next)
Last updated: Sun, 19 Oct 2014 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.