public function breakText($text)
    {
        $lines = explode(PHP_EOL, $text);

        foreach ($lines as &$line) {
            if (mb_strwidth($line) > 48) {
                $line = $this->segmentLine($line);
            }
        }

        return implode(PHP_EOL, $lines);
    }
public function breakText($text)
    {
        $lines = explode(PHP_EOL, $text);

        foreach ($lines as &$line) {
            if (mb_strwidth($line) > 48) {
                $line = $this->segmentLine($line);
            }
        }

        return implode(PHP_EOL, $lines);
    }
public function breakText ( $ text ) { $ lines = explode ( PHP_EOL , $ text ) ; foreach ( $ lines as & $ line ) { if ( mb_strwidth ( $ line ) > 48 ) { $ line = $ this -> segmentLine ( $ line ) ; } } return implode ( PHP_EOL , $ lines ) ; }
Ensure the length of each line is not longer than 48.

@param string $text

@return string
Ensure the length of each line is not longer than 48 .