Page MenuHomePhabricator

D16995.diff
No OneTemporary

D16995.diff

diff --git a/src/applications/conduit/method/ConduitAPIMethod.php b/src/applications/conduit/method/ConduitAPIMethod.php
--- a/src/applications/conduit/method/ConduitAPIMethod.php
+++ b/src/applications/conduit/method/ConduitAPIMethod.php
@@ -158,15 +158,20 @@
}
public static function loadAllConduitMethods() {
+ return self::newClassMapQuery()->execute();
+ }
+
+ private static function newClassMapQuery() {
return id(new PhutilClassMapQuery())
->setAncestorClass(__CLASS__)
- ->setUniqueMethod('getAPIMethodName')
- ->execute();
+ ->setUniqueMethod('getAPIMethodName');
}
public static function getConduitMethod($method_name) {
- $method_map = self::loadAllConduitMethods();
- return idx($method_map, $method_name);
+ return id(new PhabricatorCachedClassMapQuery())
+ ->setClassMapQuery(self::newClassMapQuery())
+ ->setMapKeyMethod('getAPIMethodName')
+ ->loadClass($method_name);
}
public function shouldRequireAuthentication() {

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 10:46 PM (16 h, 50 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6916378
Default Alt Text
D16995.diff (1017 B)

Event Timeline