Definition at line 1102 of file class.WordLevelDiff.php.
◆ __construct()
WordLevelDiff::__construct |
( |
|
$orig_lines, |
|
|
|
$closing_lines |
|
) |
| |
◆ _split()
WordLevelDiff::_split |
( |
|
$lines | ) |
|
Definition at line 1123 of file class.WordLevelDiff.php.
1125 $fname =
'WordLevelDiff::_split';
1129 $stripped = array();
1131 foreach ($lines as $line) {
1132 # If the line is too long, just pretend the entire line is one big word 1133 # This prevents resource exhaustion problems 1140 if (strlen($line) > self::MAX_LINE_LENGTH) {
1142 $stripped[] = $line;
1146 '/ ( [^\S\n]+ | [0-9_A-Za-z\x80-\xff]+ | . ) (?: (?!< \n) [^\S\n])? /xs',
1150 $words = array_merge($words, $m[0]);
1151 $stripped = array_merge($stripped, $m[1]);
1156 return array($words, $stripped);
◆ closing()
WordLevelDiff::closing |
( |
| ) |
|
Definition at line 1177 of file class.WordLevelDiff.php.
References _DiffOp\$closing.
1179 $fname =
'WordLevelDiff::closing';
1183 foreach ($this->edits as $edit) {
1184 if ($edit->type ==
'copy') {
1185 $closing->addWords($edit->closing);
1186 } elseif ($edit->closing) {
1187 $closing->addWords($edit->closing,
'ins');
1190 $lines = $closing->getLines();
◆ orig()
Definition at line 1159 of file class.WordLevelDiff.php.
References _DiffOp\$orig.
1161 $fname =
'WordLevelDiff::orig';
1165 foreach ($this->edits as $edit) {
1166 if ($edit->type ==
'copy') {
1167 $orig->addWords($edit->orig);
1168 } elseif ($edit->orig) {
1169 $orig->addWords($edit->orig,
'del');
1172 $lines = $orig->getLines();
◆ MAX_LINE_LENGTH
const WordLevelDiff::MAX_LINE_LENGTH = 10000 |
The documentation for this class was generated from the following file: