mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
48 lines
772 B
PHP
48 lines
772 B
PHP
<?php
|
|
|
|
namespace Git\Model;
|
|
|
|
class Line
|
|
{
|
|
protected $line;
|
|
protected $type;
|
|
|
|
public function __construct($data)
|
|
{
|
|
if (!empty($data)) {
|
|
if ($data[0] == '@') {
|
|
$this->setType('chunk');
|
|
}
|
|
|
|
if ($data[0] == '-') {
|
|
$this->setType('old');
|
|
}
|
|
|
|
if ($data[0] == '+') {
|
|
$this->setType('new');
|
|
}
|
|
}
|
|
|
|
$this->setLine($data);
|
|
}
|
|
|
|
public function getLine()
|
|
{
|
|
return $this->line;
|
|
}
|
|
|
|
public function setLine($line)
|
|
{
|
|
$this->line = $line;
|
|
}
|
|
|
|
public function getType()
|
|
{
|
|
return $this->type;
|
|
}
|
|
|
|
public function setType($type)
|
|
{
|
|
$this->type = $type;
|
|
}
|
|
} |