Overview

Packages

  • Text
    • Diff

Classes

  • Horde_Text_Diff
  • Horde_Text_Diff_Engine_Native
  • Horde_Text_Diff_Engine_Shell
  • Horde_Text_Diff_Engine_String
  • Horde_Text_Diff_Engine_Xdiff
  • Horde_Text_Diff_Exception
  • Horde_Text_Diff_Mapped
  • Horde_Text_Diff_Op_Add
  • Horde_Text_Diff_Op_Base
  • Horde_Text_Diff_Op_Change
  • Horde_Text_Diff_Op_Copy
  • Horde_Text_Diff_Op_Delete
  • Horde_Text_Diff_Renderer
  • Horde_Text_Diff_Renderer_Context
  • Horde_Text_Diff_Renderer_Inline
  • Horde_Text_Diff_Renderer_Unified
  • Horde_Text_Diff_ThreeWay
  • Horde_Text_Diff_ThreeWay_BlockBuilder
  • Horde_Text_Diff_ThreeWay_Op_Base
  • Horde_Text_Diff_ThreeWay_Op_Copy
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * The original PHP version of this code was written by Geoffrey T. Dairiki
 4:  * <dairiki@dairiki.org>, and is used/adapted with his permission.
 5:  *
 6:  * Copyright 2004 Geoffrey T. Dairiki <dairiki@dairiki.org>
 7:  * Copyright 2004-2012 Horde LLC (http://www.horde.org/)
 8:  *
 9:  * See the enclosed file COPYING for license information (LGPL). If you did
10:  * not receive this file, see http://www.horde.org/licenses/lgpl21.
11:  *
12:  * @package Text_Diff
13:  * @author  Geoffrey T. Dairiki <dairiki@dairiki.org>
14:  */
15: class Horde_Text_Diff_Op_Copy extends Horde_Text_Diff_Op_Base
16: {
17:     public function __construct($orig, $final = false)
18:     {
19:         if (!is_array($final)) {
20:             $final = $orig;
21:         }
22:         $this->orig = $orig;
23:         $this->final = $final;
24:     }
25: 
26:     public function reverse()
27:     {
28:         return new Horde_Text_Diff_Op_Copy($this->final, $this->orig);
29:     }
30: }
31: 
API documentation generated by ApiGen