Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Terminal.php

function Terminal::getWidth

Gets the terminal width.

File

vendor/symfony/console/Terminal.php, line 86

Class

Terminal

Namespace

Symfony\Component\Console

Code

public function getWidth() : int {
    $width = getenv('COLUMNS');
    if (false !== $width) {
        return (int) trim($width);
    }
    if (null === self::$width) {
        self::initDimensions();
    }
    return self::$width ?: 80;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal