Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/diffusion/symbol/DiffusionExternalSymbolQuery.php
13409 views
1
<?php
2
3
final class DiffusionExternalSymbolQuery extends Phobject {
4
5
private $languages = array();
6
private $types = array();
7
private $names = array();
8
private $contexts = array();
9
private $paths = array();
10
private $lines = array();
11
private $repositories = array();
12
private $characterPositions = array();
13
14
public function withLanguages(array $languages) {
15
$this->languages = $languages;
16
return $this;
17
}
18
19
public function withTypes(array $types) {
20
$this->types = $types;
21
return $this;
22
}
23
24
public function withNames(array $names) {
25
$this->names = $names;
26
return $this;
27
}
28
29
public function withContexts(array $contexts) {
30
$this->contexts = $contexts;
31
return $this;
32
}
33
34
public function withPaths(array $paths) {
35
$this->paths = $paths;
36
return $this;
37
}
38
39
public function withLines(array $lines) {
40
$this->lines = $lines;
41
return $this;
42
}
43
44
public function withCharacterPositions(array $positions) {
45
$this->characterPositions = $positions;
46
return $this;
47
}
48
49
public function withRepositories(array $repositories) {
50
assert_instances_of($repositories, 'PhabricatorRepository');
51
$this->repositories = $repositories;
52
return $this;
53
}
54
55
public function getLanguages() {
56
return $this->languages;
57
}
58
59
public function getTypes() {
60
return $this->types;
61
}
62
63
public function getNames() {
64
return $this->names;
65
}
66
67
public function getContexts() {
68
return $this->contexts;
69
}
70
71
public function getPaths() {
72
return $this->paths;
73
}
74
75
public function getLines() {
76
return $this->lines;
77
}
78
79
public function getRepositories() {
80
return $this->repositories;
81
}
82
83
public function getCharacterPositions() {
84
return $this->characterPositions;
85
}
86
87
public function matchesAnyLanguage(array $languages) {
88
return (!$this->languages) || array_intersect($languages, $this->languages);
89
}
90
91
public function matchesAnyType(array $types) {
92
return (!$this->types) || array_intersect($types, $this->types);
93
}
94
}
95
96