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:  * Copyright 2007-2012 Horde LLC (http://www.horde.org/)
 4:  *
 5:  * See the enclosed file COPYING for license information (LGPL). If you did
 6:  * not receive this file, see http://www.horde.org/licenses/lgpl21.
 7:  *
 8:  * @package Text_Diff
 9:  * @author  Geoffrey T. Dairiki <dairiki@dairiki.org>
10:  */
11: class Horde_Text_Diff_ThreeWay_Op_Base
12: {
13:     public function __construct($orig = false, $final1 = false, $final2 = false)
14:     {
15:         $this->orig = $orig ? $orig : array();
16:         $this->final1 = $final1 ? $final1 : array();
17:         $this->final2 = $final2 ? $final2 : array();
18:     }
19: 
20:     public function merged()
21:     {
22:         if (!isset($this->_merged)) {
23:             if ($this->final1 === $this->final2) {
24:                 $this->_merged = &$this->final1;
25:             } elseif ($this->final1 === $this->orig) {
26:                 $this->_merged = &$this->final2;
27:             } elseif ($this->final2 === $this->orig) {
28:                 $this->_merged = &$this->final1;
29:             } else {
30:                 $this->_merged = false;
31:             }
32:         }
33: 
34:         return $this->_merged;
35:     }
36: 
37:     public function isConflict()
38:     {
39:         return $this->merged() === false;
40:     }
41: }
42: 
API documentation generated by ApiGen