@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
3abstract class DarkConsolePlugin extends Phobject {
4
5 private $data;
6 private $request;
7 private $core;
8
9 abstract public function getName();
10 abstract public function getDescription();
11 abstract public function renderPanel();
12
13 public function __construct() {}
14
15 public function getColor() {
16 return null;
17 }
18
19 final public function getOrderKey() {
20 return sprintf(
21 '%09d%s',
22 (int)(999999999 * $this->getOrder()),
23 $this->getName());
24 }
25
26 public function getOrder() {
27 return 1.0;
28 }
29
30 public function setConsoleCore(DarkConsoleCore $core) {
31 $this->core = $core;
32 return $this;
33 }
34
35 public function getConsoleCore() {
36 return $this->core;
37 }
38
39 public function generateData() {
40 return null;
41 }
42
43 public function setData($data) {
44 $this->data = $data;
45 return $this;
46 }
47
48 public function getData() {
49 return $this->data;
50 }
51
52 public function setRequest($request) {
53 $this->request = $request;
54 return $this;
55 }
56
57 public function getRequest() {
58 return $this->request;
59 }
60
61 public function getRequestURI() {
62 return $this->getRequest()->getRequestURI();
63 }
64
65 public function didStartup() {
66 return null;
67 }
68
69 public function willShutdown() {
70 return null;
71 }
72
73 public function didShutdown() {
74 return null;
75 }
76
77 public function processRequest() {
78 return null;
79 }
80
81}