W3cubDocs

/Drupal 8

class Diff

Class representing a 'diff' between two sequences of strings. @todo document @subpackage DifferenceEngine

Copied from https://www.drupal.org/project/diff which was based PHP diff engine for phpwiki. (Taken from phpwiki-1.3.3) The original code in phpwiki was copyright (C) 2000, 2001 Geoffrey T. Dairiki <[email protected]> and licensed under GPL.

Hierarchy

  • class \Drupal\Component\Diff\Diff

File

core/lib/Drupal/Component/Diff/Diff.php, line 17

Namespace

Drupal\Component\Diff

Members

Name Modifiers Type Description
Diff::$edits protected property The list of differences as an array of diff operations.
Diff::check public function Check a Diff for validity.
Diff::closing public function Gets the closing set of lines.
Diff::getEdits public function Gets the list of differences as an array of diff operations.
Diff::isEmpty public function Check for empty diff.
Diff::lcs public function Compute the length of the Longest Common Subsequence (LCS).
Diff::orig public function Gets the original set of lines.
Diff::reverse public function Compute reversed Diff.
Diff::__construct public function Constructor. Computes diff between sequences of strings.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!Diff!Diff.php/class/Diff/8.1.x