Lines Matching defs:width
18 /** @var int the terminal width */
31 // try to get terminal width
32 $width = $this->getTerminalWidth();
33 if ($width) {
34 $this->max = $width - 1;
55 * Set the border. The border is set between each column. Its width is
78 * Set the width of the terminal to assume (in characters)
88 * Tries to figure out the width of the terminal
90 * @return int terminal width, 0 if unknown
102 $width = (int)stream_get_contents($pipes[1]);
105 return $width;
109 * Takes an array with dynamic column width and calculates the correct width
111 * Column width can be given as fixed char widths, percentages and a single * width can be given
113 * refer to the remaining space after allocating the fixed width
196 foreach ($columns as $col => $width) {
197 $wrapped[$col] = explode("\n", $this->wordwrap($texts[$col], $width, "\n", true));
208 foreach ($columns as $col => $width) {
214 $chunk = $this->pad($val, $width);
287 * @param int $width
293 protected function wordwrap($str, $width = 75, $break = "\n", $cut = false)
298 if ($this->strlen($line) <= $width) {
305 if ($this->strlen($actual . $word) <= $width) {
313 while ($this->strlen($actual) > $width) {
314 $line .= $this->substr($actual, 0, $width) . $break;
315 $actual = $this->substr($actual, $width);