Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F80986
D7517.diff
All Users
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
D7517.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -139,6 +139,7 @@
'PhutilDefaultSyntaxHighlighterEngineTestCase' => 'markup/syntax/engine/__tests__/PhutilDefaultSyntaxHighlighterEngineTestCase.php',
'PhutilDeferredLog' => 'filesystem/PhutilDeferredLog.php',
'PhutilDeferredLogTestCase' => 'filesystem/__tests__/PhutilDeferredLogTestCase.php',
+ 'PhutilDirectedScalarGraph' => 'utils/PhutilDirectedScalarGraph.php',
'PhutilDirectoryFixture' => 'filesystem/PhutilDirectoryFixture.php',
'PhutilDivinerSyntaxHighlighter' => 'markup/syntax/highlighter/PhutilDivinerSyntaxHighlighter.php',
'PhutilDocblockParser' => 'parser/PhutilDocblockParser.php',
@@ -519,6 +520,7 @@
'PhutilDefaultSyntaxHighlighterEnginePygmentsFuture' => 'FutureProxy',
'PhutilDefaultSyntaxHighlighterEngineTestCase' => 'PhutilTestCase',
'PhutilDeferredLogTestCase' => 'PhutilTestCase',
+ 'PhutilDirectedScalarGraph' => 'AbstractDirectedGraph',
'PhutilDocblockParserTestCase' => 'PhutilTestCase',
'PhutilEditDistanceMatrixTestCase' => 'PhutilTestCase',
'PhutilEmailAddressTestCase' => 'PhutilTestCase',
diff --git a/src/utils/PhutilDirectedScalarGraph.php b/src/utils/PhutilDirectedScalarGraph.php
new file mode 100644
--- /dev/null
+++ b/src/utils/PhutilDirectedScalarGraph.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * Concrete subclass of @{class:AbstractDirectedGraph} which can not load any
+ * data from external sources.
+ */
+final class PhutilDirectedScalarGraph extends AbstractDirectedGraph {
+
+ protected function loadEdges(array $nodes) {
+ throw new Exception(
+ "PhutilDirectedScalarGraph can not load additional nodes at runtime. ".
+ "Tried to load: ".implode(', ', $nodes));
+ }
+
+}
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/kw/cs/ocnlgdhd4d7hexhk
Default Alt Text
D7517.diff (1 KB)
Attached To
Mode
D7517: Add "PhutilDirectedScalarGraph"
Attached
Detach File
Event Timeline
Log In to Comment