Source for file context.php
Documentation is available at context.php
* "Context" diff renderer.
* This class renders the diff in classic "context diff" format.
* $Horde: framework/Text_Diff/Diff/Renderer/context.php,v 1.3.2.4 2009/01/06 15:23:42 jan Exp $
* Copyright 2004-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.
/** Text_Diff_Renderer */
require_once 'Text/Diff/Renderer.php';
* Number of leading context "lines" to preserve.
var $_leading_context_lines = 4;
* Number of trailing context "lines" to preserve.
var $_trailing_context_lines = 4;
function _blockHeader ($xbeg, $xlen, $ybeg, $ylen)
$this->_second_block = " --- $ybeg ----\n";
return " ***************\n*** $xbeg ****";
return $this->_second_block;
function _context ($lines)
$this->_second_block .= $this->_lines ($lines, ' ');
return $this->_lines ($lines, ' ');
$this->_second_block .= $this->_lines ($lines, '+ ');
function _deleted ($lines)
return $this->_lines ($lines, '- ');
function _changed ($orig, $final)
$this->_second_block .= $this->_lines ($final, '! ');
return $this->_lines ($orig, '! ');
Documentation generated on Fri, 24 Jul 2009 15:00:02 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.
|