Diff.php (1537B)
1 <?php 2 /* 3 * This file is part of the Diff package. 4 * 5 * (c) Sebastian Bergmann <sebastian@phpunit.de> 6 * 7 * For the full copyright and license information, please view the LICENSE 8 * file that was distributed with this source code. 9 */ 10 11 namespace SebastianBergmann\Diff; 12 13 /** 14 * @package Diff 15 * @author Sebastian Bergmann <sebastian@phpunit.de> 16 * @author Kore Nordmann <mail@kore-nordmann.de> 17 * @copyright Sebastian Bergmann <sebastian@phpunit.de> 18 * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License 19 * @link http://www.github.com/sebastianbergmann/diff 20 */ 21 class Diff 22 { 23 /** 24 * @var string 25 */ 26 private $from; 27 28 /** 29 * @var string 30 */ 31 private $to; 32 33 /** 34 * @var Chunk[] 35 */ 36 private $chunks; 37 38 /** 39 * @param string $from 40 * @param string $to 41 * @param Chunk[] $chunks 42 */ 43 public function __construct($from, $to, array $chunks = array()) 44 { 45 $this->from = $from; 46 $this->to = $to; 47 $this->chunks = $chunks; 48 } 49 50 /** 51 * @return string 52 */ 53 public function getFrom() 54 { 55 return $this->from; 56 } 57 58 /** 59 * @return string 60 */ 61 public function getTo() 62 { 63 return $this->to; 64 } 65 66 /** 67 * @return Chunk[] 68 */ 69 public function getChunks() 70 { 71 return $this->chunks; 72 } 73 74 /** 75 * @param Chunk[] $chunks 76 */ 77 public function setChunks(array $chunks) 78 { 79 $this->chunks = $chunks; 80 } 81 }