MediaWiki  REL1_24
UnifiedDiffFormatter.php
Go to the documentation of this file.
00001 <?php
00031 class UnifiedDiffFormatter extends DiffFormatter {
00032 
00034     protected $leadingContextLines = 2;
00035 
00037     protected $trailingContextLines = 2;
00038 
00042     protected function added( $lines ) {
00043         $this->lines( $lines, '+' );
00044     }
00045 
00049     protected function deleted( $lines ) {
00050         $this->lines( $lines, '-' );
00051     }
00052 
00057     protected function changed( $orig, $closing ) {
00058         $this->deleted( $orig );
00059         $this->added( $closing );
00060     }
00061 
00070     protected function blockHeader( $xbeg, $xlen, $ybeg, $ylen ) {
00071         return "@@ -$xbeg,$xlen +$ybeg,$ylen @@";
00072     }
00073 
00074 }