PhpSchool\CliMenu\Terminal\TerminalInterface::getWidth PHP 메소드

getWidth() 공개 메소드

Get the available width of the terminal
public getWidth ( ) : integer
리턴 integer
    public function getWidth();

Usage Example

예제 #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;
 }
All Usage Examples Of PhpSchool\CliMenu\Terminal\TerminalInterface::getWidth