Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14382742
D16995.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1017 B
Referenced Files
None
Subscribers
None
D16995.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 6:27 AM (19 h, 21 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6916378
Default Alt Text
D16995.diff (1017 B)
Attached To
Mode
D16995: Use PhabricatorCachedClassMapQuery in Conduit method lookups
Attached
Detach File
Event Timeline
Log In to Comment