Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / doorkeeper / engine / DoorkeeperURIRef.php
blobdb9b5682c1a9765ce43b1320b70d1709ce329edf
1 <?php
3 final class DoorkeeperURIRef extends Phobject {
5 private $uri;
6 private $applicationType;
7 private $applicationDomain;
8 private $objectType;
9 private $objectID;
10 private $text;
11 private $displayMode = self::DISPLAY_FULL;
13 const DISPLAY_FULL = 'full';
14 const DISPLAY_SHORT = 'short';
16 public function setURI(PhutilURI $uri) {
17 $this->uri = $uri;
18 return $this;
21 public function getURI() {
22 return $this->uri;
25 public function setApplicationType($application_type) {
26 $this->applicationType = $application_type;
27 return $this;
30 public function getApplicationType() {
31 return $this->applicationType;
34 public function setApplicationDomain($application_domain) {
35 $this->applicationDomain = $application_domain;
36 return $this;
39 public function getApplicationDomain() {
40 return $this->applicationDomain;
43 public function setObjectType($object_type) {
44 $this->objectType = $object_type;
45 return $this;
48 public function getObjectType() {
49 return $this->objectType;
52 public function setObjectID($object_id) {
53 $this->objectID = $object_id;
54 return $this;
57 public function getObjectID() {
58 return $this->objectID;
61 public function setText($text) {
62 $this->text = $text;
63 return $this;
66 public function getText() {
67 return $this->text;
70 public function setDisplayMode($display_mode) {
71 $options = array(
72 self::DISPLAY_FULL => true,
73 self::DISPLAY_SHORT => true,
76 if (!isset($options[$display_mode])) {
77 throw new Exception(
78 pht(
79 'DoorkeeperURIRef display mode "%s" is unknown.',
80 $display_mode));
83 $this->displayMode = $display_mode;
84 return $this;
87 public function getDisplayMode() {
88 return $this->displayMode;