@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class DiffusionServiceRef
4 extends Phobject {
5
6 private $uri;
7 private $protocol;
8 private $isWritable;
9 private $devicePHID;
10 private $deviceName;
11
12 private function __construct() {
13 return;
14 }
15
16 public static function newFromDictionary(array $map) {
17 $ref = new self();
18
19 $ref->uri = $map['uri'];
20 $ref->isWritable = $map['writable'];
21 $ref->devicePHID = $map['devicePHID'];
22 $ref->protocol = $map['protocol'];
23 $ref->deviceName = $map['device'];
24
25 return $ref;
26 }
27
28 public function isWritable() {
29 return $this->isWritable;
30 }
31
32 public function getDevicePHID() {
33 return $this->devicePHID;
34 }
35
36 public function getURI() {
37 return $this->uri;
38 }
39
40 public function getProtocol() {
41 return $this->protocol;
42 }
43
44 public function getDeviceName() {
45 return $this->deviceName;
46 }
47
48}