Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15408822
D13455.id32565.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13455.id32565.diff
View Options
diff --git a/src/applications/celerity/postprocessor/CelerityPostprocessor.php b/src/applications/celerity/postprocessor/CelerityPostprocessor.php
--- a/src/applications/celerity/postprocessor/CelerityPostprocessor.php
+++ b/src/applications/celerity/postprocessor/CelerityPostprocessor.php
@@ -36,34 +36,10 @@
}
final public static function getAllPostprocessors() {
- static $postprocessors;
-
- if ($postprocessors === null) {
- $objects = id(new PhutilSymbolLoader())
- ->setAncestorClass(__CLASS__)
- ->loadObjects();
-
- $map = array();
- foreach ($objects as $object) {
- $key = $object->getPostprocessorKey();
- if (empty($map[$key])) {
- $map[$key] = $object;
- continue;
- }
-
- throw new Exception(
- pht(
- 'Two postprocessors (of classes "%s" and "%s") define the same '.
- 'postprocessor key ("%s"). Each postprocessor must define a '.
- 'unique key.',
- get_class($object),
- get_class($map[$key]),
- $key));
- }
- $postprocessors = $map;
- }
-
- return $postprocessors;
+ return id(new PhutilClassMapQuery())
+ ->setAncestorClass(__CLASS__)
+ ->setUniqueMethod('getPostprocessorKey')
+ ->execute();
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 1:36 AM (2 d, 23 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7712313
Default Alt Text
D13455.id32565.diff (1 KB)
Attached To
Mode
D13455: [redesign] Use PhutilClassMapQuery
Attached
Detach File
Event Timeline
Log In to Comment