Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/diffusion/query/rawdiff/DiffusionRawDiffQuery.php
12242 views
1
<?php
2
3
abstract class DiffusionRawDiffQuery
4
extends DiffusionFileFutureQuery {
5
6
private $linesOfContext = 65535;
7
private $anchorCommit;
8
private $againstCommit;
9
10
final public static function newFromDiffusionRequest(
11
DiffusionRequest $request) {
12
return parent::newQueryObject(__CLASS__, $request);
13
}
14
15
final public function setLinesOfContext($lines_of_context) {
16
$this->linesOfContext = $lines_of_context;
17
return $this;
18
}
19
20
final public function getLinesOfContext() {
21
return $this->linesOfContext;
22
}
23
24
final public function setAgainstCommit($value) {
25
$this->againstCommit = $value;
26
return $this;
27
}
28
29
final public function getAgainstCommit() {
30
return $this->againstCommit;
31
}
32
33
public function setAnchorCommit($anchor_commit) {
34
$this->anchorCommit = $anchor_commit;
35
return $this;
36
}
37
38
public function getAnchorCommit() {
39
if ($this->anchorCommit) {
40
return $this->anchorCommit;
41
}
42
43
return $this->getRequest()->getStableCommit();
44
}
45
46
}
47
48