Page MenuHomePhabricator

D9596.diff
No OneTemporary

D9596.diff

diff --git a/src/console/PhutilConsoleTable.php b/src/console/PhutilConsoleTable.php
--- a/src/console/PhutilConsoleTable.php
+++ b/src/console/PhutilConsoleTable.php
@@ -19,7 +19,7 @@
* 'email' => 'joe@bloggs.com',
* ))
*
- * ->setDrawBorders(true)
+ * ->setBorders(true)
* ->draw();
*/
final class PhutilConsoleTable extends Phobject {
@@ -29,6 +29,7 @@
private $widths = array();
private $borders = false;
private $padding = 1;
+ private $showHeader = true;
private $console;
const ALIGN_LEFT = 'left';
@@ -60,6 +61,12 @@
public function setPadding($padding) {
$this->padding = $padding;
+ return $this;
+ }
+
+ public function setShowHeader($show_header) {
+ $this->showHeader = $show_header;
+ return $this;
}
@@ -111,6 +118,10 @@
$output .= $this->formatSeparator('=');
}
+ if (!$this->showHeader) {
+ return $output;
+ }
+
$columns = array();
foreach ($this->columns as $key => $column) {
$columns[] = PhutilConsoleFormatter::formatString(

File Metadata

Mime Type
text/plain
Expires
Mon, May 13, 9:32 PM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6277497
Default Alt Text
D9596.diff (1 KB)

Event Timeline