/
Base.php
115 lines (105 loc) · 2.14 KB
/
Base.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
/**
* Base quick log class.
*
* Copyright 2008-2017 Horde LLC (http://www.horde.org/)
*
* See the enclosed file LICENSE for license information (LGPL). If you
* did not receive this file, see http://www.horde.org/licenses/lgpl21.
*
* @package Vcs
*/
abstract class Horde_Vcs_QuickLog_Base
{
/**
* A repository object.
*
* @var Horde_Vcs_Base
*/
protected $_rep;
/**
* A log revision.
*
* @var string
*/
protected $_rev;
/**
* A log author.
*
* @var string
*/
protected $_author;
/**
* A log timestamp.
*
* @var integer
*/
protected $_date;
/**
* A log message.
*
* @var string
*/
protected $_log;
/**
* Constructor.
*
* @param Horde_Vcs_Base $rep A repository object.
* @param string $rev A log revision.
* @param integer $date A log timestamp.
* @param string $author A log author.
* @param string $log A log message.
*/
public function __construct($rep, $rev, $date = null, $author = null,
$log = null)
{
$this->_rep = $rep;
$this->_rev = $rev;
$this->_date = $date;
$this->_author = $author;
$this->_log = $log;
}
/**
* When serializing, don't return the repository object
*/
public function __sleep()
{
return array_diff(array_keys(get_object_vars($this)), array('_rep'));
}
/**
* Returns the log revision.
*
* @return string A revision.
*/
public function getRevision()
{
return $this->_rev;
}
/**
* Returns the log date.
*
* @return integer A date.
*/
public function getDate()
{
return $this->_date;
}
/**
* Returns the log author.
*
* @return string An author.
*/
public function getAuthor()
{
return $this->_author;
}
/**
* Returns the log message.
*
* @return string A message.
*/
public function getMessage()
{
return $this->_log;
}
}