public function getSpeechBubble($text)
    {
        $lines = $this->getMessageLines($text);
        $lineLength = $this->getMaxLineLength($lines);
        $text = '';
        $numberOfLines = count($lines);
        $firstLine = str_pad(array_shift($lines), $lineLength);
        if ($numberOfLines === 1) {
            $text = "< {$firstLine} >";
        } else {
            $lastLine = str_pad(array_pop($lines), $lineLength);
            $text = "/ {$firstLine} \\\n";
            foreach ($lines as $line) {
                $line = str_pad($line, $lineLength);
                $text .= "| {$line} |\n";
            }
            $text .= "\\ {$lastLine} /";
        }

        $text = $this->extendBubble($text);
        return $text;
    }
public function getSpeechBubble($text)
    {
        $lines = $this->getMessageLines($text);
        $lineLength = $this->getMaxLineLength($lines);
        $text = '';
        $numberOfLines = count($lines);
        $firstLine = str_pad(array_shift($lines), $lineLength);
        if ($numberOfLines === 1) {
            $text = "< {$firstLine} >";
        } else {
            $lastLine = str_pad(array_pop($lines), $lineLength);
            $text = "/ {$firstLine} \\\n";
            foreach ($lines as $line) {
                $line = str_pad($line, $lineLength);
                $text .= "| {$line} |\n";
            }
            $text .= "\\ {$lastLine} /";
        }

        $text = $this->extendBubble($text);
        return $text;
    }
public function getSpeechBubble ( $ text ) { $ lines = $ this -> getMessageLines ( $ text ) ; $ lineLength = $ this -> getMaxLineLength ( $ lines ) ; $ text = '' ; $ numberOfLines = count ( $ lines ) ; $ firstLine = str_pad ( array_shift ( $ lines ) , $ lineLength ) ; if ( $ numberOfLines === 1 ) { $ text = "< {$firstLine} >" ; } else { $ lastLine = str_pad ( array_pop ( $ lines ) , $ lineLength ) ; $ text = "/ {$firstLine} \\\n" ; foreach ( $ lines as $ line ) { $ line = str_pad ( $ line , $ lineLength ) ; $ text .= "| {$line} |\n" ; } $ text .= "\\ {$lastLine} /" ; } $ text = $ this -> extendBubble ( $ text ) ; return $ text ; }
Obtain the speech bubble.
@param $text
@return string
Obtain the speech bubble .