src/TerminalObject/Dynamic/Padding.php
public function label($content)
    {
        // Handle long labels by splitting them across several lines
        $lines = [];
        $stop = mb_strlen($content);
        $width = $this->util->width();
        for ($i = 0; $i < $stop; $i += $width) {
            $lines[] = mb_substr($content, $i, $width);
        }
        $content = array_pop($lines);

        foreach ($lines as $line) {
            $this->output->write($this->parser->apply($line));
        }

        $content = $this->padContent($content);
        $content = $this->parser->apply($content);

        $this->output->sameLine();
        $this->output->write($content);

        return $this;
    }
public function label($content)
    {
        // Handle long labels by splitting them across several lines
        $lines = [];
        $stop = mb_strlen($content);
        $width = $this->util->width();
        for ($i = 0; $i < $stop; $i += $width) {
            $lines[] = mb_substr($content, $i, $width);
        }
        $content = array_pop($lines);

        foreach ($lines as $line) {
            $this->output->write($this->parser->apply($line));
        }

        $content = $this->padContent($content);
        $content = $this->parser->apply($content);

        $this->output->sameLine();
        $this->output->write($content);

        return $this;
    }
public function label ( $ content ) { // Handle long labels by splitting them across several lines $ lines = [ ] ; $ stop = mb_strlen ( $ content ) ; $ width = $ this -> util -> width ( ) ; for ( $ i = 0 ; $ i < $ stop ; $ i += $ width ) { $ lines [ ] = mb_substr ( $ content , $ i , $ width ) ; } $ content = array_pop ( $ lines ) ; foreach ( $ lines as $ line ) { $ this -> output -> write ( $ this -> parser -> apply ( $ line ) ) ; } $ content = $ this -> padContent ( $ content ) ; $ content = $ this -> parser -> apply ( $ content ) ; $ this -> output -> sameLine ( ) ; $ this -> output -> write ( $ content ) ; return $ this ; }
Output the content and pad to the previously defined length

@param string $content

@return \League\CLImate\TerminalObject\Dynamic\Padding
Output the content and pad to the previously defined length