Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / search / index / PhabricatorSearchAbstractDocument.php
blob0e57be848c7d9274e8da3f39a8c4c0a5c94f737f
1 <?php
3 final class PhabricatorSearchAbstractDocument extends Phobject {
5 private $phid;
6 private $documentType;
7 private $documentTitle;
8 private $documentCreated;
9 private $documentModified;
10 private $fields = array();
11 private $relationships = array();
13 public function setPHID($phid) {
14 $this->phid = $phid;
15 return $this;
18 public function setDocumentType($document_type) {
19 $this->documentType = $document_type;
20 return $this;
23 public function setDocumentTitle($title) {
24 $this->documentTitle = $title;
25 $this->addField(PhabricatorSearchDocumentFieldType::FIELD_TITLE, $title);
26 return $this;
29 public function addField($field, $corpus, $aux_phid = null) {
30 $this->fields[] = array($field, $corpus, $aux_phid);
31 return $this;
34 public function addRelationship($type, $related_phid, $rtype, $time) {
35 $this->relationships[] = array($type, $related_phid, $rtype, $time);
36 return $this;
39 public function setDocumentCreated($date) {
40 $this->documentCreated = $date;
41 return $this;
44 public function setDocumentModified($date) {
45 $this->documentModified = $date;
46 return $this;
49 public function getPHID() {
50 return $this->phid;
53 public function getDocumentType() {
54 return $this->documentType;
57 public function getDocumentTitle() {
58 return $this->documentTitle;
61 public function getDocumentCreated() {
62 return $this->documentCreated;
65 public function getDocumentModified() {
66 return $this->documentModified;
69 public function getFieldData() {
70 return $this->fields;
73 public function getRelationshipData() {
74 return $this->relationships;