|
| diff ($from_lines, $to_lines) |
|
Definition at line 255 of file Diff.php.
◆ diff()
Text_Diff_Engine_xdiff::diff |
( |
|
$from_lines, |
|
|
|
$to_lines |
|
) |
| |
Definition at line 257 of file Diff.php.
258 {
259
260 $from_string = implode("\n", $from_lines);
261 $to_string = implode("\n", $to_lines);
262
263
264 $diff = xdiff_string_diff($from_string, $to_string, count($to_lines));
265 $diff = explode("\n", $diff);
266
267
268
269
270
271
272
273
274
275 $edits = array();
276 foreach ($diff as $line) {
277 switch ($line[0]) {
278 case ' ':
280 break;
281
282 case '+':
284 break;
285
286 case '-':
288 break;
289 }
290 }
291
292 return $edits;
293 }
The documentation for this class was generated from the following file:
- Services/XHTMLValidator/validator/Text_Diff/Diff.php