public function Diff::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Component/Diff/Diff.php \Drupal\Component\Diff\Diff::__construct()
- 9 core/lib/Drupal/Component/Diff/Diff.php \Drupal\Component\Diff\Diff::__construct()
Constructor. Computes diff between sequences of strings.
Parameters
array $from_lines: An array of strings. (Typically these are lines from a file.)
array $to_lines: An array of strings.
File
- core/
lib/ Drupal/ Component/ Diff/ Diff.php, line 36
Class
- Diff
- Class representing a 'diff' between two sequences of strings. @todo document @subpackage DifferenceEngine
Namespace
Drupal\Component\DiffCode
public function __construct($from_lines, $to_lines) {
$eng = new DiffEngine();
$this->edits = $eng
->diff($from_lines, $to_lines);
//$this->_check($from_lines, $to_lines);
}