Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/infrastructure/diff/inline/PhabricatorDiffInlineCommentContext.php
12242 views
1
<?php
2
3
final class PhabricatorDiffInlineCommentContext
4
extends PhabricatorInlineCommentContext {
5
6
private $filename;
7
private $headLines;
8
private $bodyLines;
9
private $tailLines;
10
11
public static function newFromCacheData(array $map) {
12
$context = new self();
13
14
$context->setFilename(idx($map, 'filename'));
15
$context->setHeadLines(idx($map, 'headLines'));
16
$context->setBodyLines(idx($map, 'bodyLines'));
17
$context->setTailLines(idx($map, 'tailLines'));
18
19
return $context;
20
}
21
22
public function newCacheDataMap() {
23
return array(
24
'filename' => $this->getFilename(),
25
'headLines' => $this->getHeadLines(),
26
'bodyLines' => $this->getBodyLines(),
27
'tailLines' => $this->getTailLines(),
28
);
29
}
30
31
public function setFilename($filename) {
32
$this->filename = $filename;
33
return $this;
34
}
35
36
public function getFilename() {
37
return $this->filename;
38
}
39
40
public function setHeadLines(array $head_lines) {
41
$this->headLines = $head_lines;
42
return $this;
43
}
44
45
public function getHeadLines() {
46
return $this->headLines;
47
}
48
49
public function setBodyLines(array $body_lines) {
50
$this->bodyLines = $body_lines;
51
return $this;
52
}
53
54
public function getBodyLines() {
55
return $this->bodyLines;
56
}
57
58
public function setTailLines(array $tail_lines) {
59
$this->tailLines = $tail_lines;
60
return $this;
61
}
62
63
public function getTailLines() {
64
return $this->tailLines;
65
}
66
67
}
68
69