mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
60 lines
880 B
PHP
60 lines
880 B
PHP
<?php
|
|
|
|
namespace Git\Model;
|
|
|
|
use Git\Model\Line;
|
|
|
|
class Diff
|
|
{
|
|
protected $lines;
|
|
protected $index;
|
|
protected $old;
|
|
protected $new;
|
|
protected $file;
|
|
|
|
public function addLine($line)
|
|
{
|
|
$this->lines[] = new Line($line);
|
|
}
|
|
|
|
public function getLines()
|
|
{
|
|
return $this->lines;
|
|
}
|
|
|
|
public function setIndex($index)
|
|
{
|
|
$this->index = $index;
|
|
}
|
|
|
|
public function getIndex()
|
|
{
|
|
return $this->index;
|
|
}
|
|
|
|
public function setOld($old)
|
|
{
|
|
$this->old = $old;
|
|
}
|
|
|
|
public function getOld()
|
|
{
|
|
return $this->old;
|
|
}
|
|
|
|
public function setNew($new)
|
|
{
|
|
$this->new = $new;
|
|
$this->file = substr($new, 6);
|
|
}
|
|
|
|
public function getNew()
|
|
{
|
|
return $this->new;
|
|
}
|
|
|
|
public function getFile()
|
|
{
|
|
return $this->file;
|
|
}
|
|
} |