Symfony\Component\Console\Style\SymfonyStyle::__construct PHP Method

__construct() public method

public __construct ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    public function __construct(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->bufferedOutput = new BufferedOutput($output->getVerbosity(), false, clone $output->getFormatter());
        // Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not.
        $width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH;
        $this->lineLength = min($width - (int) (DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);

        parent::__construct($output);
    }

Usage Example

Esempio n. 1
0
 public function __construct(InputInterface $input, OutputInterface $output)
 {
     parent::__construct($input, $output);
     $ref = new \ReflectionProperty(get_parent_class($this), 'lineLength');
     $ref->setAccessible(true);
     $ref->setValue($this, 120);
 }
All Usage Examples Of Symfony\Component\Console\Style\SymfonyStyle::__construct