DiffFormatter::$leading_context_lines

Number of leading context "lines" to preserve. This should be left at zero for this class, but subclasses may want to set this to other values. File core/lib/Drupal/Component/Diff/DiffFormatter.php, line 29 Class DiffFormatter A class to format Diffs Namespace Drupal\Component\Diff Code public $leading_context_lines = 0;

DiffFormatter

A class to format Diffs This class formats the diff in classic diff format. It is intended that this class be customized via inheritance, to obtain fancier outputs. @todo document @private @subpackage DifferenceEngine Hierarchy class \Drupal\Component\Diff\DiffFormatter File core/lib/Drupal/Component/Diff/DiffFormatter.php, line 17 Namespace Drupal\Component\Diff Members Name Modifiers Type Description DiffFormatter::$leading_context_lines public property Number of leadi

DiffFormatter

Diff formatter which uses returns output that can be rendered to a table. Hierarchy class \Drupal\Component\Diff\DiffFormatterclass \Drupal\Core\Diff\DiffFormatter File core/lib/Drupal/Core/Diff/DiffFormatter.php, line 13 Namespace Drupal\Core\Diff Members Name Modifiers Type Description DiffFormatter::$leading_context_lines public property Number of leading context "lines" to preserve. DiffFormatter::$line_stats protected property The line stats. DiffFormatte

DiffEngine::_shift_boundaries

protected DiffEngine::_shift_boundaries($lines, &$changed, $other_changed) Adjust inserts/deletes of identical lines to join changes as much as possible. We do something when a run of changed lines include a line at one end and has an excluded, identical line at the other. We are free to choose which identical line is included. `compareseq' usually chooses the one at the beginning, but usually it is cleaner to consider the following identical line to be the "change". This is extracted verba

DiffEngine::_line_hash

protected DiffEngine::_line_hash($line) Returns the whole line if it's small enough, or the MD5 hash otherwise. File core/lib/Drupal/Component/Diff/Engine/DiffEngine.php, line 136 Class DiffEngine Class used internally by Diff to actually compute the diffs. Namespace Drupal\Component\Diff\Engine Code protected function _line_hash($line) { if (Unicode::strlen($line) > $this::MAX_XREF_LENGTH) { return md5($line); } else { return $line; } }

DiffEngine::_lcs_pos

protected DiffEngine::_lcs_pos($ypos) File core/lib/Drupal/Component/Diff/Engine/DiffEngine.php, line 243 Class DiffEngine Class used internally by Diff to actually compute the diffs. Namespace Drupal\Component\Diff\Engine Code protected function _lcs_pos($ypos) { $end = $this->lcs; if ($end == 0 || $ypos > $this->seq[$end]) { $this->seq[++$this->lcs] = $ypos; $this->in_seq[$ypos] = 1; return $this->lcs; } $beg = 1; while ($beg < $end) {

DiffEngine::_diag

protected DiffEngine::_diag($xoff, $xlim, $yoff, $ylim, $nchunks) Divide the Largest Common Subsequence (LCS) of the sequences [XOFF, XLIM) and [YOFF, YLIM) into NCHUNKS approximately equally sized segments. Returns (LCS, PTS). LCS is the length of the LCS. PTS is an array of NCHUNKS+1 (X, Y) indexes giving the diving points between sub sequences. The first sub-sequence is contained in [X0, X1), [Y0, Y1), the second in [X1, X2), [Y1, Y2) and so on. Note that (X0, Y0) == (XOFF, YOFF) and (X[NCHU

DiffEngine::_compareseq

protected DiffEngine::_compareseq($xoff, $xlim, $yoff, $ylim) Find LCS of two sequences. The results are recorded in the vectors $this->{x,y}changed[], by storing a 1 in the element for each line that is an insertion or deletion (ie. is not in the LCS). The subsequence of file 0 is [XOFF, XLIM) and likewise for file 1. Note that XLIM, YLIM are exclusive bounds. All line numbers are origin-0 and discarded lines are not counted. File core/lib/Drupal/Component/Diff/Engine/DiffEngine.php, line 2

DiffEngine::USE_ASSERTS

File core/lib/Drupal/Component/Diff/Engine/DiffEngine.php, line 32 Class DiffEngine Class used internally by Diff to actually compute the diffs. Namespace Drupal\Component\Diff\Engine Code const USE_ASSERTS = FALSE;

DiffEngine::MAX_XREF_LENGTH

File core/lib/Drupal/Component/Diff/Engine/DiffEngine.php, line 34 Class DiffEngine Class used internally by Diff to actually compute the diffs. Namespace Drupal\Component\Diff\Engine Code const MAX_XREF_LENGTH = 10000;