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])
ファイルを表示 Open project: horde/horde

Protected Properties

Property Type Description
$_diffCommand string Path to the diff executable

Public Methods

Method Description
diff ( array $from_lines, array $to_lines ) : array Returns the array of differences.

Protected Methods

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

Method Details

_getLines() protected method

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.
return array The chopped lines

diff() public method

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
return 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
return string