Page MenuHomePhabricator

D21260.diff
No OneTemporary

D21260.diff

diff --git a/src/conduit/ArcanistConduitEngine.php b/src/conduit/ArcanistConduitEngine.php
--- a/src/conduit/ArcanistConduitEngine.php
+++ b/src/conduit/ArcanistConduitEngine.php
@@ -40,7 +40,7 @@
}
public function newCall($method, array $parameters) {
- if ($this->conduitURI == null) {
+ if ($this->conduitURI == null && $this->client === null) {
$this->raiseURIException();
}
@@ -78,9 +78,11 @@
if ($token) {
$client->setConduitToken($this->getConduitToken());
}
+
+ $this->client = $client;
}
- return $client;
+ return $this->client;
}
private function raiseURIException() {
@@ -105,4 +107,12 @@
throw new ArcanistUsageException($block->drawConsoleString());
}
+ public static function newConduitEngineFromConduitClient(
+ ConduitClient $client) {
+
+ $engine = new self();
+ $engine->client = $client;
+
+ return $engine;
+ }
}

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 19, 7:18 AM (10 h, 35 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7019410
Default Alt Text
D21260.diff (937 B)

Event Timeline