예제 #1
0
 /**
  * @param string $string1
  * @param string $string2
  * @param int $zeilenlaenge
  * @return Horde_Text_Diff
  */
 public static function getTextDiffMitZeilennummern($string1 = "", $string2 = "", $zeilenlaenge)
 {
     HtmlBBcodeUtils::initZeilenCounter();
     $string1 = trim(static::bbNormalizeForDiff($string1));
     $arr1 = HtmlBBcodeUtils::bbcode2zeilen_absaetze($string1, $zeilenlaenge);
     $text1 = implode("\n#ABSATZ#\n", $arr1);
     HtmlBBcodeUtils::initZeilenCounter();
     $string2 = trim(static::bbNormalizeForDiff($string2));
     $arr2 = HtmlBBcodeUtils::bbcode2zeilen_absaetze($string2, $zeilenlaenge);
     $text2 = implode("\n#ABSATZ#\n", $arr2);
     $diff = new Horde_Text_Diff('native', array(explode("\n", $text1), explode("\n", $text2)));
     return $diff;
 }