PHP Class Horde_Text_Diff_Engine_Shell, horde

This class uses the Unix diff program via shell_exec to compute the differences between the two input arrays. Copyright 2007-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Milian Wolff ([email protected])
Afficher le fichier Open project: horde/horde

Protected Properties

Свойство Type Description
$_diffCommand string Path to the diff executable

Méthodes publiques

Méthode Description
diff ( array $from_lines, array $to_lines ) : array Returns the array of differences.

Méthodes protégées

Méthode Description
_getLines ( &$text_lines, &$line_no, integer $end = false ) : array Get lines from either the old or new text

Method Details

_getLines() protected méthode

Get lines from either the old or new text
protected _getLines ( &$text_lines, &$line_no, integer $end = false ) : array
$end integer Optional end line, when we want to chop more than one line.
Résultat array The chopped lines

diff() public méthode

Returns the array of differences.
public diff ( array $from_lines, array $to_lines ) : array
$from_lines array lines of text from old file
$to_lines array lines of text from new file
Résultat array all changes made (array with Horde_Text_Diff_Op_* objects)

Property Details

$_diffCommand protected_oe property

Path to the diff executable
protected string $_diffCommand
Résultat string