Falcon_Converter::wrap PHP Метод

wrap() защищенный Метод

Has special handling for some text elements (blockquotes and tables)
protected wrap ( string $str ) : string
$str string Text to wrap
Результат string Word-wrapped text
    protected function wrap($str)
    {
        $lines = explode("\n", $str);
        $text = '';
        foreach ($lines as $line) {
            if (strlen($line) > 78) {
                if ($line[0] === '>') {
                    $wrapped = wordwrap($line, 76);
                    $text .= str_replace("\n", "\n> ", $wrapped) . "\n";
                } elseif ($line[0] === '+' || $line[0] === '|') {
                    $text .= $line . "\n";
                } else {
                    $text .= wordwrap($line, 78) . "\n";
                }
            } else {
                $text .= $line . "\n";
            }
        }
        return $text;
    }