summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas V.V.Cox <cox@php.net>2002-06-06 08:50:31 +0000
committerTomas V.V.Cox <cox@php.net>2002-06-06 08:50:31 +0000
commit8447d094c6dd1c0c7516df97ba9fe4c2136a533b (patch)
tree9f0de44aa203f0c7d6f693e5b61c204bfe51a37c
parent41e7696ec97f95d3f3d7a9664ef1b0d44ca36f9b (diff)
downloadphp-git-8447d094c6dd1c0c7516df97ba9fe4c2136a533b.tar.gz
Wrap table contents
# Sorry could't wait for that commit :-)
-rw-r--r--pear/PEAR/Frontend/CLI.php27
1 files changed, 17 insertions, 10 deletions
diff --git a/pear/PEAR/Frontend/CLI.php b/pear/PEAR/Frontend/CLI.php
index 3a984c3e3c..93a0bd949c 100644
--- a/pear/PEAR/Frontend/CLI.php
+++ b/pear/PEAR/Frontend/CLI.php
@@ -347,7 +347,7 @@ class PEAR_Frontend_CLI extends PEAR
$this->_displayLine($borderline);
}
}
-
+
// }}}
// {{{ outputData()
@@ -359,7 +359,7 @@ class PEAR_Frontend_CLI extends PEAR
$this->_startTable($data);
if (isset($data['headline']) && is_array($data['headline']))
$this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55)));
-
+
foreach($data['data'] as $category) {
foreach($category as $pkg) {
$this->_tableRow($pkg, null, array(1 => array('wrap' => 55)));
@@ -371,7 +371,7 @@ class PEAR_Frontend_CLI extends PEAR
$this->_startTable($data);
if (isset($data['headline']) && is_array($data['headline']))
$this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55)));
-
+
foreach($data['data'] as $category) {
foreach($category as $pkg) {
unset($pkg[3]);
@@ -384,7 +384,7 @@ class PEAR_Frontend_CLI extends PEAR
$this->_startTable($data);
if (isset($data['headline']) && is_array($data['headline']))
$this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55)));
-
+
foreach($data['data'] as $group) {
foreach($group as $value) {
if ($value === null || $value === '') {
@@ -413,10 +413,17 @@ class PEAR_Frontend_CLI extends PEAR
if (is_array($data))
{
$this->_startTable($data);
- if (isset($data['headline']) && is_array($data['headline']))
- $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55)));
- foreach($data['data'] as $row)
- $this->_tableRow($row);
+ $opts = array(0 => array('wrap' => 25),
+ 1 => array('wrap' => 55)
+ );
+ if (isset($data['headline']) && is_array($data['headline'])) {
+ $this->_tableRow($data['headline'],
+ array('bold' => true),
+ $opts);
+ }
+ foreach($data['data'] as $row) {
+ $this->_tableRow($row, null, $opts);
+ }
$this->_endTable();
} else {
$this->_displayLine($data);
@@ -427,12 +434,12 @@ class PEAR_Frontend_CLI extends PEAR
// }}}
// {{{ log(text)
-
+
function log($text)
{
return $this->_displayLine($text);
}
-
+
// }}}
// {{{ bold($text)