1: <?php
 2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 
14: class Horde_Text_Diff_Renderer_Context extends Horde_Text_Diff_Renderer
15: {
16:     17: 18: 
19:     protected $_leading_context_lines = 4;
20: 
21:     22: 23: 
24:     protected $_trailing_context_lines = 4;
25: 
26:     protected $_second_block = '';
27: 
28:     protected function ($xbeg, $xlen, $ybeg, $ylen)
29:     {
30:         if ($xlen != 1) {
31:             $xbeg .= ',' . $xlen;
32:         }
33:         if ($ylen != 1) {
34:             $ybeg .= ',' . $ylen;
35:         }
36:         $this->_second_block = "--- $ybeg ----\n";
37:         return "***************\n*** $xbeg ****";
38:     }
39: 
40:     protected function _endBlock()
41:     {
42:         return $this->_second_block;
43:     }
44: 
45:     protected function _context($lines)
46:     {
47:         $this->_second_block .= $this->_lines($lines, '  ');
48:         return $this->_lines($lines, '  ');
49:     }
50: 
51:     protected function _added($lines)
52:     {
53:         $this->_second_block .= $this->_lines($lines, '+ ');
54:         return '';
55:     }
56: 
57:     protected function _deleted($lines)
58:     {
59:         return $this->_lines($lines, '- ');
60:     }
61: 
62:     protected function _changed($orig, $final)
63:     {
64:         $this->_second_block .= $this->_lines($final, '! ');
65:         return $this->_lines($orig, '! ');
66:     }
67: 
68: }
69: