Text_Diff
[ class tree: Text_Diff ] [ index: Text_Diff ] [ all elements ]

Class: Text_Diff_Mapped

Source Location: /Text_Diff-1.2.1/Text/Diff/Mapped.php

Class Overview

Text_Diff
   |
   --Text_Diff_Mapped

$Horde: framework/Text_Diff/Diff/Mapped.php,v 1.3.2.4 2009/01/06 15:23:41 jan Exp $


Author(s):

Methods


Inherited Variables

Inherited Methods

Class: Text_Diff

Text_Diff::__construct()
Computes diffs between sequences of strings.
Text_Diff::countAddedLines()
returns the number of new (added) lines in a given diff.
Text_Diff::countDeletedLines()
Returns the number of deleted (removed) lines in a given diff.
Text_Diff::getDiff()
Returns the array of differences.
Text_Diff::getFinal()
Gets the final set of lines.
Text_Diff::getOriginal()
Gets the original set of lines.
Text_Diff::isEmpty()
Checks for an empty diff.
Text_Diff::lcs()
Computes the length of the Longest Common Subsequence (LCS).
Text_Diff::reverse()
Computes a reversed diff.
Text_Diff::trimNewlines()
Removes trailing newlines from a line of text. This is meant to be used with array_walk().
Text_Diff::_getTempDir()
Determines the location of the system temporary directory.

Class Details

[line 13]
$Horde: framework/Text_Diff/Diff/Mapped.php,v 1.3.2.4 2009/01/06 15:23:41 jan Exp $

Copyright 2007-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://opensource.org/licenses/lgpl-license.php.



[ Top ]


Method Detail

__construct (Constructor)   [line 31]

Text_Diff_Mapped __construct( array $from_lines, array $to_lines, array $mapped_from_lines, array $mapped_to_lines)

Computes a diff between sequences of strings.

This can be used to compute things like case-insensitve diffs, or diffs which ignore changes in white-space.


Overrides Text_Diff::__construct() (Computes diffs between sequences of strings.)

Parameters:

array   $from_lines   —  An array of strings.
array   $to_lines   —  An array of strings.
array   $mapped_from_lines   —  This array should have the same size number of elements as $from_lines. The elements in $mapped_from_lines and $mapped_to_lines are what is actually compared when computing the diff.
array   $mapped_to_lines   —  This array should have the same number of elements as $to_lines.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 16:03:26 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.