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
Fri, Oct 25, 11:47 AM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6716403
Default Alt Text
D16995.diff (1017 B)

Event Timeline