Source for file Registry.php
Documentation is available at Registry.php
* PEAR_Command_Registry (list, list-files, shell-test, info commands)
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Registry.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
require_once 'PEAR/Command/Common.php';
* PEAR commands for registry manipulation
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
'summary' => 'List Installed Packages In The Default Channel',
'doc' => 'list installed packages from this channel',
'doc' => 'list installed packages from all channels',
'doc' => 'output fully channel-aware data, even on failure',
If invoked without parameters, this command lists the PEAR packages
installed in your php_dir ({config php_dir}). With a parameter, it
lists the files in a package.
'summary' => 'List Files In Installed Package',
'function' => 'doFileList',
List the files in an installed package.
'summary' => 'Shell Script Test',
'function' => 'doShellTest',
'doc' => '<package> [[relation] version]
Tests if a package is installed in the system. Will exit(1) if it is not.
<relation> The version comparison operator. One of:
<, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne
<version> The version to compare with
'summary' => 'Display information about a package',
Displays information about a package. The package argument may be a
local package file, an URL to a package file, or the name of an
* PEAR_Command_Registry constructor.
function _sortinfo ($a, $b)
$apackage = isset ($a['package']) ? $a['package'] : $a['name'];
$bpackage = isset ($b['package']) ? $b['package'] : $b['name'];
return strcmp($apackage, $bpackage);
function doList($command, $options, $params)
$reg = &$this->config->getRegistry ();
$channelinfo = isset ($options['channelinfo']);
if (isset ($options['allchannels']) && !$channelinfo) {
return $this->doListAll($command, array (), $params);
if (isset ($options['allchannels']) && $channelinfo) {
// allchannels with $channelinfo
unset ($options['allchannels']);
$channels = $reg->getChannels ();
foreach ($channels as $channel) {
$options['channel'] = $channel->getName ();
$ret = $this->doList($command, $options, $params);
// for now, only give first error
if (count($params) === 1 ) {
return $this->doFileList($command, $options, $params);
if (isset ($options['channel'])) {
if (!$reg->channelExists ($options['channel'])) {
return $this->raiseError('Channel "' . $options['channel'] . '" does not exist');
$channel = $reg->channelName ($options['channel']);
$channel = $this->config->get ('default_channel');
$installed = $reg->packageInfo (null , null , $channel);
usort($installed, array (&$this, '_sortinfo'));
'caption' => 'Installed packages, channel ' .
'headline' => array ('Package', 'Version', 'State'),
$data['headline'] = array ('Channel', 'Package', 'Version', 'State');
if (count($installed) && !isset ($data['data'])) {
foreach ($installed as $package) {
$pobj = $reg->getPackage (isset ($package['package']) ?
$package['package'] : $package['name'], $channel);
$packageinfo = array ($pobj->getChannel (), $pobj->getPackage (), $pobj->getVersion (),
$pobj->getState () ? $pobj->getState () : null );
$packageinfo = array ($pobj->getPackage (), $pobj->getVersion (),
$pobj->getState () ? $pobj->getState () : null );
$data['data'][] = $packageinfo;
if (count($installed) === 0 ) {
$data = '(no packages installed from channel ' . $channel . ')';
'caption' => 'Installed packages, channel ' .
'data' => array (array ('(no packages installed)')),
$this->ui->outputData ($data, $command);
function doListAll($command, $options, $params)
// This duplicate code is deprecated over
// list --channelinfo, which gives identical
// output for list and list --allchannels.
$reg = &$this->config->getRegistry ();
$installed = $reg->packageInfo (null , null , null );
foreach ($installed as $channel => $packages) {
usort($packages, array ($this, '_sortinfo'));
'caption' => 'Installed packages, channel ' . $channel . ':',
'headline' => array ('Package', 'Version', 'State'),
foreach ($packages as $package) {
$p = isset ($package['package']) ? $package['package'] : $package['name'];
$pobj = $reg->getPackage ($p, $channel);
$data['data'][] = array ($pobj->getPackage (), $pobj->getVersion (),
$pobj->getState () ? $pobj->getState () : null );
// Adds a blank line after each section
$data['data'][] = array ();
if (count($packages) === 0 ) {
'caption' => 'Installed packages, channel ' . $channel . ':',
'data' => array (array ('(no packages installed)'), array ()),
$this->ui->outputData ($data, $command);
if (count($params) !== 1 ) {
return $this->raiseError('list-files expects 1 parameter');
$reg = &$this->config->getRegistry ();
require_once 'PEAR/PackageFile.php';
$headings = array ('Package File', 'Install Path');
$parsed = $reg->parsePackageName ($params[0 ], $this->config->get ('default_channel'));
$info = &$reg->getPackage ($parsed['package'], $parsed['channel']);
$headings = array ('Type', 'Install Path');
return $this->raiseError(" `$params[0]' not installed" );
$list = ($info->getPackagexmlVersion () == '1.0' || $installed) ?
$info->getFilelist () : $info->getContents ();
$caption = 'Installed Files For ' . $params[0 ];
$caption = 'Contents of ' . basename($params[0 ]);
'headline' => $headings);
if ($info->getPackagexmlVersion () == '1.0' || $installed) {
foreach ($list as $file => $att) {
if (empty ($att['installed_as'])) {
$data['data'][] = array ($att['role'], $att['installed_as']);
if (isset ($att['baseinstalldir']) && !in_array($att['role'],
array ('test', 'data', 'doc'))) {
$dest = $att['baseinstalldir'] . DIRECTORY_SEPARATOR .
$dest = $this->config->get ($role . '_dir') . DIRECTORY_SEPARATOR .
$info->getPackage () . DIRECTORY_SEPARATOR . $dest;
$dest = $this->config->get ('php_dir') . DIRECTORY_SEPARATOR .
$ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR;
array (DIRECTORY_SEPARATOR ,
$data['data'][] = array ($file, $dest);
} else { // package.xml 2.0, not installed
if (!isset ($list['dir']['file'][0 ])) {
$list['dir']['file'] = array ($list['dir']['file']);
foreach ($list['dir']['file'] as $att) {
$role->setup ($this, $info, $att, $file);
if (!$role->isInstallable ()) {
$dest = '(not installable)';
$dest = $role->processInstallation ($info, $att, $file, '');
$dest = '(Unknown role "' . $att['role'] . ')';
$data['data'][] = array ($file, $dest);
$this->ui->outputData ($data, $command);
if (count($params) < 1 ) {
return PEAR::raiseError('ERROR, usage: pear shell-test packagename [[relation] version]');
$reg = &$this->config->getRegistry ();
$info = $reg->parsePackageName ($params[0 ], $this->config->get ('default_channel'));
exit (1 ); // invalid package name
$package = $info['package'];
$channel = $info['channel'];
if (!$reg->packageExists ($package, $channel)) {
if ($channel == 'pecl.php.net') {
if ($reg->packageExists ($package, 'pear.php.net')) {
$channel = 'pear.php.net'; // magically change channels for extensions
if (count($params) === 1 ) {
if (!$reg->packageExists ($package, $channel)) {
// "pear shell-test Foo 1.0"
} elseif (count($params) === 2 ) {
$v = $reg->packageInfo ($package, 'version', $channel);
// "pear shell-test Foo ge 1.0"
} elseif (count($params) === 3 ) {
$v = $reg->packageInfo ($package, 'version', $channel);
$this->raiseError(" $command: expects 1 to 3 parameters" );
function doInfo($command, $options, $params)
if (count($params) !== 1 ) {
return $this->raiseError('pear info expects 1 parameter');
$reg = &$this->config->getRegistry ();
require_once 'PEAR/PackageFile.php';
$uinfo = $obj->getUserInfo ();
foreach ($uinfo as $message) {
$message = $message['message'];
$this->ui->outputData ($message);
if ($obj->getPackagexmlVersion () != '1.0') {
return $this->_doInfo2 ($command, $options, $params, $obj, false );
$parsed = $reg->parsePackageName ($params[0 ], $this->config->get ('default_channel'));
$package = $parsed['package'];
$channel = $parsed['channel'];
$info = $reg->packageInfo ($package, null , $channel);
if (isset ($info['old'])) {
$obj = $reg->getPackage ($package, $channel);
return $this->_doInfo2 ($command, $options, $params, $obj, true );
$this->raiseError(" No information found for `$params[0]'" );
unset ($info['filelist']);
unset ($info['changelog']);
if (isset ($info['xsdversion'])) {
$info['package.xml version'] = $info['xsdversion'];
unset ($info['xsdversion']);
if (isset ($info['packagerversion'])) {
$info['packaged with PEAR version'] = $info['packagerversion'];
unset ($info['packagerversion']);
$longtext = array ('description', 'summary');
foreach ($keys as $key) {
foreach ($info[$key] as $m) {
$mstr .= $m['name'] . " <";
if (isset ($m['email'])) {
$mstr .= $m['handle'] . '@php.net';
foreach ($info[$key] as $d) {
if (isset ($this->_deps_rel_trans[$d['rel']])) {
$rel = $this->_deps_rel_trans[$d['rel']];
if (isset ($this->_deps_type_trans[$d['type']])) {
$type = ucfirst($this->_deps_type_trans[$d['type']]);
$name = $d['name'] . ' ';
if (isset ($d['version'])) {
$version = $d['version'] . ' ';
if (isset ($d['optional']) && $d['optional'] == 'yes') {
$optional = ' (optional)';
$dstr .= " $type $name$rel $version$optional\n";
$debug = $this->config->get ('verbose');
foreach ($info[$key] as $p) {
if ($debug < 2 && $p['type'] != "class") {
// Only print classes when verbosity mode is < 2
$pstr .= ucfirst($p['type']) . " " . $p['name'];
if (isset ($p['explicit']) && $p['explicit'] == 1 ) {
case 'configure_options' : {
foreach ($info[$key] as $i => $p) {
'return join(" = ",$a);'), $info[$key][$i]);
$info[$key][$i] = implode(', ', $info[$key][$i]);
$info[$key] = implode("\n", $info[$key]);
$info[$key] = implode(", ", $info[$key]);
if ($key == '_lastmodified') {
$hdate = date('Y-m-d', $info[$key]);
$info['Last Modified'] = $hdate;
} elseif ($key == '_lastversion') {
$info['Previous Installed Version'] = $info[$key] ? $info[$key] : '- None -';
$info[$key] = trim($info[$key]);
$caption = 'About ' . $info['package'] . '-' . $info['version'];
foreach ($info as $key => $value) {
$data['data'][] = array ($key, $value);
$this->ui->outputData ($data, 'package-info');
function _doInfo2 ($command, $options, $params, &$obj, $installed)
$reg = &$this->config->getRegistry ();
$caption = 'About ' . $obj->getChannel () . '/' . $obj->getPackage () . '-' .
switch ($obj->getPackageType ()) {
$release = 'PEAR-style PHP-based Package';
$release = 'PECL-style PHP extension (source code)';
$release = 'PECL-style Zend extension (source code)';
$release = 'PECL-style PHP extension (binary)';
$release = 'PECL-style Zend extension (binary)';
$release = 'Package bundle (collection of packages)';
$extends = $obj->getExtends ();
$obj->getPackage () . ' (extends ' . $extends . ')' : $obj->getPackage ();
if ($src = $obj->getSourcePackage ()) {
$extends .= ' (source package ' . $src['channel'] . '/' . $src['package'] . ')';
'Release Type' => $release,
'Channel' => $obj->getChannel (),
'Description' => preg_replace('/ +/', ' ', $obj->getDescription ()),
$info['Maintainers'] = '';
foreach (array ('lead', 'developer', 'contributor', 'helper') as $role) {
$leads = $obj->{" get{$role}s" }();
if (isset ($leads['active'])) {
foreach ($leads as $lead) {
if (!empty ($info['Maintainers'])) {
$info['Maintainers'] .= "\n";
$active = $lead['active'] == 'no' ? ', inactive' : '';
$info['Maintainers'] .= $lead['name'] . ' <';
$info['Maintainers'] .= $lead['email'] . " > ($role$active)";
$info['Release Date'] = $obj->getDate ();
if ($time = $obj->getTime ()) {
$info['Release Date'] .= ' ' . $time;
$info['Release Version'] = $obj->getVersion () . ' (' . $obj->getState () . ')';
$info['API Version'] = $obj->getVersion ('api') . ' (' . $obj->getState ('api') . ')';
$info['License'] = $obj->getLicense ();
$uri = $obj->getLicenseLocation ();
if (isset ($uri['uri'])) {
$info['License'] .= ' (' . $uri['uri'] . ')';
$extra = $obj->getInstalledLocation ($info['filesource']);
$info['License'] .= ' (' . $uri['filesource'] . ')';
$info['Release Notes'] = $obj->getNotes ();
if ($compat = $obj->getCompatible ()) {
if (!isset ($compat[0 ])) {
$compat = array ($compat);
$info['Compatible with'] = '';
foreach ($compat as $package) {
$info['Compatible with'] .= $package['channel'] . '/' . $package['name'] .
"\nVersions >= " . $package['min'] . ', <= ' . $package['max'];
if (isset ($package['exclude'])) {
$package['exclude'] = implode(', ', $package['exclude']);
if (!isset ($info['Not Compatible with'])) {
$info['Not Compatible with'] = '';
$info['Not Compatible with'] .= "\n";
$info['Not Compatible with'] .= $package['channel'] . '/' .
$package['name'] . "\nVersions " . $package['exclude'];
$usesrole = $obj->getUsesrole ();
if (!isset ($usesrole[0 ])) {
$usesrole = array ($usesrole);
foreach ($usesrole as $roledata) {
if (isset ($info['Uses Custom Roles'])) {
$info['Uses Custom Roles'] .= "\n";
$info['Uses Custom Roles'] = '';
if (isset ($roledata['package'])) {
$rolepackage = $reg->parsedPackageNameToString ($roledata, true );
$rolepackage = $roledata['uri'];
$info['Uses Custom Roles'] .= $roledata['role'] . ' (' . $rolepackage . ')';
$usestask = $obj->getUsestask ();
if (!isset ($usestask[0 ])) {
$usestask = array ($usestask);
foreach ($usestask as $taskdata) {
if (isset ($info['Uses Custom Tasks'])) {
$info['Uses Custom Tasks'] .= "\n";
$info['Uses Custom Tasks'] = '';
if (isset ($taskdata['package'])) {
$taskpackage = $reg->parsedPackageNameToString ($taskdata, true );
$taskpackage = $taskdata['uri'];
$info['Uses Custom Tasks'] .= $taskdata['task'] . ' (' . $taskpackage . ')';
$deps = $obj->getDependencies ();
$info['Required Dependencies'] = 'PHP version ' . $deps['required']['php']['min'];
if (isset ($deps['required']['php']['max'])) {
$info['Required Dependencies'] .= '-' . $deps['required']['php']['max'] . "\n";
$info['Required Dependencies'] .= "\n";
if (isset ($deps['required']['php']['exclude'])) {
if (!isset ($info['Not Compatible with'])) {
$info['Not Compatible with'] = '';
$info['Not Compatible with'] .= "\n";
if (is_array($deps['required']['php']['exclude'])) {
$deps['required']['php']['exclude'] =
implode(', ', $deps['required']['php']['exclude']);
$info['Not Compatible with'] .= "PHP versions\n " .
$deps['required']['php']['exclude'];
$info['Required Dependencies'] .= 'PEAR installer version';
if (isset ($deps['required']['pearinstaller']['max'])) {
$info['Required Dependencies'] .= 's ' .
$deps['required']['pearinstaller']['min'] . '-' .
$deps['required']['pearinstaller']['max'];
$info['Required Dependencies'] .= ' ' .
$deps['required']['pearinstaller']['min'] . ' or newer';
if (isset ($deps['required']['pearinstaller']['exclude'])) {
if (!isset ($info['Not Compatible with'])) {
$info['Not Compatible with'] = '';
$info['Not Compatible with'] .= "\n";
if (is_array($deps['required']['pearinstaller']['exclude'])) {
$deps['required']['pearinstaller']['exclude'] =
implode(', ', $deps['required']['pearinstaller']['exclude']);
$info['Not Compatible with'] .= "PEAR installer\n Versions " .
$deps['required']['pearinstaller']['exclude'];
foreach (array ('Package', 'Extension') as $type) {
if (isset ($deps['required'][$index])) {
if (isset ($deps['required'][$index]['name'])) {
$deps['required'][$index] = array ($deps['required'][$index]);
foreach ($deps['required'][$index] as $package) {
if (isset ($package['conflicts'])) {
$infoindex = 'Not Compatible with';
if (!isset ($info['Not Compatible with'])) {
$info['Not Compatible with'] = '';
$info['Not Compatible with'] .= "\n";
$infoindex = 'Required Dependencies';
$info[$infoindex] .= "\n";
if ($index == 'extension') {
$name = $package['name'];
if (isset ($package['channel'])) {
$name = $package['channel'] . '/' . $package['name'];
$name = '__uri/' . $package['name'] . ' (static URI)';
$info[$infoindex] .= " $type $name";
if (isset ($package['uri'])) {
$info[$infoindex] .= " \n Download URI: $package[uri]";
if (isset ($package['max']) && isset ($package['min'])) {
$info[$infoindex] .= " \n Versions " .
$package['min'] . '-' . $package['max'];
} elseif (isset ($package['min'])) {
$info[$infoindex] .= " \n Version " .
$package['min'] . ' or newer';
} elseif (isset ($package['max'])) {
$info[$infoindex] .= " \n Version " .
$package['max'] . ' or older';
if (isset ($package['recommended'])) {
$info[$infoindex] .= " \n Recommended version: $package[recommended]";
if (isset ($package['exclude'])) {
if (!isset ($info['Not Compatible with'])) {
$info['Not Compatible with'] = '';
$info['Not Compatible with'] .= "\n";
$package['exclude'] = implode(', ', $package['exclude']);
$package['package'] = $package['name']; // for parsedPackageNameToString
if (isset ($package['conflicts'])) {
$info['Not Compatible with'] .= '=> except ';
$info['Not Compatible with'] .= 'Package ' .
$reg->parsedPackageNameToString ($package, true );
$info['Not Compatible with'] .= "\n Versions " . $package['exclude'];
if (isset ($deps['required']['os'])) {
if (isset ($deps['required']['os']['name'])) {
$dep['required']['os']['name'] = array ($dep['required']['os']['name']);
foreach ($dep['required']['os'] as $os) {
if (isset ($os['conflicts']) && $os['conflicts'] == 'yes') {
if (!isset ($info['Not Compatible with'])) {
$info['Not Compatible with'] = '';
$info['Not Compatible with'] .= "\n";
$info['Not Compatible with'] .= " $os[name] Operating System";
$info['Required Dependencies'] .= "\n";
$info['Required Dependencies'] .= " $os[name] Operating System";
if (isset ($deps['required']['arch'])) {
if (isset ($deps['required']['arch']['pattern'])) {
$dep['required']['arch']['pattern'] = array ($dep['required']['os']['pattern']);
foreach ($dep['required']['arch'] as $os) {
if (isset ($os['conflicts']) && $os['conflicts'] == 'yes') {
if (!isset ($info['Not Compatible with'])) {
$info['Not Compatible with'] = '';
$info['Not Compatible with'] .= "\n";
$info['Not Compatible with'] .= " OS/Arch matching pattern '/$os[pattern]/'";
$info['Required Dependencies'] .= "\n";
$info['Required Dependencies'] .= " OS/Arch matching pattern '/$os[pattern]/'";
if (isset ($deps['optional'])) {
foreach (array ('Package', 'Extension') as $type) {
if (isset ($deps['optional'][$index])) {
if (isset ($deps['optional'][$index]['name'])) {
$deps['optional'][$index] = array ($deps['optional'][$index]);
foreach ($deps['optional'][$index] as $package) {
if (isset ($package['conflicts']) && $package['conflicts'] == 'yes') {
$infoindex = 'Not Compatible with';
if (!isset ($info['Not Compatible with'])) {
$info['Not Compatible with'] = '';
$info['Not Compatible with'] .= "\n";
$infoindex = 'Optional Dependencies';
if (!isset ($info['Optional Dependencies'])) {
$info['Optional Dependencies'] = '';
$info['Optional Dependencies'] .= "\n";
if ($index == 'extension') {
$name = $package['name'];
if (isset ($package['channel'])) {
$name = $package['channel'] . '/' . $package['name'];
$name = '__uri/' . $package['name'] . ' (static URI)';
$info[$infoindex] .= " $type $name";
if (isset ($package['uri'])) {
$info[$infoindex] .= " \n Download URI: $package[uri]";
if ($infoindex == 'Not Compatible with') {
// conflicts is only used to say that all versions conflict
if (isset ($package['max']) && isset ($package['min'])) {
$info[$infoindex] .= " \n Versions " .
$package['min'] . '-' . $package['max'];
} elseif (isset ($package['min'])) {
$info[$infoindex] .= " \n Version " .
$package['min'] . ' or newer';
} elseif (isset ($package['max'])) {
$info[$infoindex] .= " \n Version " .
$package['min'] . ' or older';
if (isset ($package['recommended'])) {
$info[$infoindex] .= " \n Recommended version: $package[recommended]";
if (isset ($package['exclude'])) {
if (!isset ($info['Not Compatible with'])) {
$info['Not Compatible with'] = '';
$info['Not Compatible with'] .= "\n";
$package['exclude'] = implode(', ', $package['exclude']);
$info['Not Compatible with'] .= " Package $package\n Versions " .
if (isset ($deps['group'])) {
if (!isset ($deps['group'][0 ])) {
$deps['group'] = array ($deps['group']);
foreach ($deps['group'] as $group) {
$info['Dependency Group ' . $group['attribs']['name']] = $group['attribs']['hint'];
$groupindex = $group['attribs']['name'] . ' Contents';
foreach (array ('Package', 'Extension') as $type) {
if (isset ($group[$index])) {
if (isset ($group[$index]['name'])) {
$group[$index] = array ($group[$index]);
foreach ($group[$index] as $package) {
if (!empty ($info[$groupindex])) {
$info[$groupindex] .= "\n";
if ($index == 'extension') {
$name = $package['name'];
if (isset ($package['channel'])) {
$name = $package['channel'] . '/' . $package['name'];
$name = '__uri/' . $package['name'] . ' (static URI)';
if (isset ($package['uri'])) {
if (isset ($package['conflicts']) && $package['conflicts'] == 'yes') {
$info[$groupindex] .= " Not Compatible with $type $name";
$info[$groupindex] .= " $type $name";
$info[$groupindex] .= " \n Download URI: $package[uri]";
if (isset ($package['conflicts']) && $package['conflicts'] == 'yes') {
$info[$groupindex] .= " Not Compatible with $type $name";
$info[$groupindex] .= " $type $name";
if (isset ($package['max']) && isset ($package['min'])) {
$info[$groupindex] .= " \n Versions " .
$package['min'] . '-' . $package['max'];
} elseif (isset ($package['min'])) {
$info[$groupindex] .= " \n Version " .
$package['min'] . ' or newer';
} elseif (isset ($package['max'])) {
$info[$groupindex] .= " \n Version " .
$package['min'] . ' or older';
if (isset ($package['recommended'])) {
$info[$groupindex] .= " \n Recommended version: $package[recommended]";
if (isset ($package['exclude'])) {
if (!isset ($info['Not Compatible with'])) {
$info['Not Compatible with'] = '';
$info[$groupindex] .= "Not Compatible with\n";
$package['exclude'] = implode(', ', $package['exclude']);
$info[$groupindex] .= " Package $package\n Versions " .
if ($obj->getPackageType () == 'bundle') {
$info['Bundled Packages'] = '';
foreach ($obj->getBundledPackages () as $package) {
if (!empty ($info['Bundled Packages'])) {
$info['Bundled Packages'] .= "\n";
if (isset ($package['uri'])) {
$info['Bundled Packages'] .= '__uri/' . $package['name'];
$info['Bundled Packages'] .= " \n (URI: $package[uri]";
$info['Bundled Packages'] .= $package['channel'] . '/' . $package['name'];
$info['package.xml version'] = '2.0';
if ($obj->getLastModified ()) {
$info['Last Modified'] = date('Y-m-d H:i', $obj->getLastModified ());
$v = $obj->getLastInstalledVersion ();
$info['Previous Installed Version'] = $v ? $v : '- None -';
foreach ($info as $key => $value) {
$data['data'][] = array ($key, $value);
$data['raw'] = $obj->getArray (); // no validation needed
$this->ui->outputData ($data, 'package-info');
Documentation generated on Wed, 06 Jul 2011 23:31:15 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.
|