DiffEngine::diff

public DiffEngine::diff($from_lines, $to_lines) File core/lib/Drupal/Component/Diff/Engine/DiffEngine.php, line 36 Class DiffEngine Class used internally by Diff to actually compute the diffs. Namespace Drupal\Component\Diff\Engine Code public function diff($from_lines, $to_lines) { $n_from = sizeof($from_lines); $n_to = sizeof($to_lines); $this->xchanged = $this->ychanged = array(); $this->xv = $this->yv = array(); $this->xind = $this->yind = array(); u

DiffEngine

Class used internally by Diff to actually compute the diffs. The algorithm used here is mostly lifted from the perl module Algorithm::Diff (version 1.06) by Ned Konz, which is available at: http://www.perl.com/CPAN/authors/id/N/NE/NEDKONZ/Algorithm-Diff-1.06.zip More ideas are taken from: http://www.ics.uci.edu/~eppstein/161/960229.html Some ideas (and a bit of code) are from analyze.c, from GNU diffutils-2.7, which can be found at: ftp://gnudist.gnu.org/pub/gnu/diffutils/diffutils-2.7.tar.gz c

DiffArray::diffAssocRecursive

public static DiffArray::diffAssocRecursive(array $array1, array $array2) Recursively computes the difference of arrays with additional index check. This is a version of array_diff_assoc() that supports multidimensional arrays. Parameters array $array1: The array to compare from. array $array2: The array to compare to. Return value array Returns an array containing all the values from array1 that are not present in array2. File core/lib/Drupal/Component/Utility/DiffArray.php, line 27 Class

DiffArray

Provides helpers to perform diffs on multi dimensional arrays. Hierarchy class \Drupal\Component\Utility\DiffArray Related topics Utility classes and functions Overview of utility classes and functions for developers. File core/lib/Drupal/Component/Utility/DiffArray.php, line 10 Namespace Drupal\Component\Utility Members Name Modifiers Type Description DiffArray::diffAssocRecursive public static function Recursively computes the difference of arrays with additional ind

Diff::__construct

public Diff::__construct($from_lines, $to_lines) Constructor. Computes diff between sequences of strings. Parameters $from_lines array An array of strings.: (Typically these are lines from a file.) $to_lines array An array of strings.: File core/lib/Drupal/Component/Diff/Diff.php, line 34 Class Diff Class representing a 'diff' between two sequences of strings. @todo document @subpackage DifferenceEngine Namespace Drupal\Component\Diff Code public function __construct($from_lines, $to_

Diff::reverse

public Diff::reverse() Compute reversed Diff. SYNOPSIS: $diff = new Diff($lines1, $lines2); $rev = $diff->reverse(); Return value object A Diff object representing the inverse of the original diff. File core/lib/Drupal/Component/Diff/Diff.php, line 50 Class Diff Class representing a 'diff' between two sequences of strings. @todo document @subpackage DifferenceEngine Namespace Drupal\Component\Diff Code public function reverse() { $rev = $this; $rev->edits = array(); foreac

Diff::orig

public Diff::orig() Gets the original set of lines. This reconstructs the $from_lines parameter passed to the constructor. Return value array The original sequence of strings. File core/lib/Drupal/Component/Diff/Diff.php, line 98 Class Diff Class representing a 'diff' between two sequences of strings. @todo document @subpackage DifferenceEngine Namespace Drupal\Component\Diff Code public function orig() { $lines = array(); foreach ($this->edits as $edit) { if ($edit->or

Diff::lcs

public Diff::lcs() Compute the length of the Longest Common Subsequence (LCS). This is mostly for diagnostic purposed. Return value int The length of the LCS. File core/lib/Drupal/Component/Diff/Diff.php, line 80 Class Diff Class representing a 'diff' between two sequences of strings. @todo document @subpackage DifferenceEngine Namespace Drupal\Component\Diff Code public function lcs() { $lcs = 0; foreach ($this->edits as $edit) { if ($edit->type == 'copy') { $lcs

Diff::isEmpty

public Diff::isEmpty() Check for empty diff. Return value bool True iff two sequences were identical. File core/lib/Drupal/Component/Diff/Diff.php, line 64 Class Diff Class representing a 'diff' between two sequences of strings. @todo document @subpackage DifferenceEngine Namespace Drupal\Component\Diff Code public function isEmpty() { foreach ($this->edits as $edit) { if ($edit->type != 'copy') { return FALSE; } } return TRUE; }

Diff::getEdits

public Diff::getEdits() Gets the list of differences as an array of diff operations. Return value \Drupal\Component\Diff\Engine\DiffOp[] The list of differences as an array of diff operations. File core/lib/Drupal/Component/Diff/Diff.php, line 168 Class Diff Class representing a 'diff' between two sequences of strings. @todo document @subpackage DifferenceEngine Namespace Drupal\Component\Diff Code public function getEdits() { return $this->edits; }