getWidth() 공개 메소드

Get the available width of the terminal
public getWidth ( ) : integer
리턴 integer
예제 #1
0
 /**
  * @param int $width
  * @return MenuStyle
  */
 public function setWidth($width)
 {
     $availableWidth = $this->terminal->getWidth() - $this->margin * 2 - $this->padding * 2;
     if ($width >= $availableWidth) {
         $width = $availableWidth;
     }
     $this->width = $width;
     $this->calculateContentWidth();
     return $this;
 }
예제 #2
0
 /**
  * @return string
  */
 public function lineBreak()
 {
     echo $this->color->__invoke(str_repeat('─', $this->terminal->getWidth()))->yellow();
 }
예제 #3
0
 /**
  * @return string
  */
 public function lineBreak()
 {
     return $this->style(str_repeat("─", $this->terminal->getWidth()), 'yellow');
 }