Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15433336
D16089.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D16089.id.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
@@ -541,6 +541,7 @@
'DifferentialRevisionRequiredActionResultBucket' => 'applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php',
'DifferentialRevisionResultBucket' => 'applications/differential/query/DifferentialRevisionResultBucket.php',
'DifferentialRevisionReviewersHeraldField' => 'applications/differential/herald/DifferentialRevisionReviewersHeraldField.php',
+ 'DifferentialRevisionSearchConduitAPIMethod' => 'applications/differential/conduit/DifferentialRevisionSearchConduitAPIMethod.php',
'DifferentialRevisionSearchEngine' => 'applications/differential/query/DifferentialRevisionSearchEngine.php',
'DifferentialRevisionStatus' => 'applications/differential/constants/DifferentialRevisionStatus.php',
'DifferentialRevisionSummaryHeraldField' => 'applications/differential/herald/DifferentialRevisionSummaryHeraldField.php',
@@ -4820,6 +4821,7 @@
'PhabricatorDestructibleInterface',
'PhabricatorProjectInterface',
'PhabricatorFulltextInterface',
+ 'PhabricatorConduitResultInterface',
),
'DifferentialRevisionAffectedFilesHeraldField' => 'DifferentialRevisionHeraldField',
'DifferentialRevisionAuthorHeraldField' => 'DifferentialRevisionHeraldField',
@@ -4853,6 +4855,7 @@
'DifferentialRevisionRequiredActionResultBucket' => 'DifferentialRevisionResultBucket',
'DifferentialRevisionResultBucket' => 'PhabricatorSearchResultBucket',
'DifferentialRevisionReviewersHeraldField' => 'DifferentialRevisionHeraldField',
+ 'DifferentialRevisionSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
'DifferentialRevisionSearchEngine' => 'PhabricatorApplicationSearchEngine',
'DifferentialRevisionStatus' => 'Phobject',
'DifferentialRevisionSummaryHeraldField' => 'DifferentialRevisionHeraldField',
diff --git a/src/applications/differential/conduit/DifferentialRevisionSearchConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialRevisionSearchConduitAPIMethod.php
new file mode 100644
--- /dev/null
+++ b/src/applications/differential/conduit/DifferentialRevisionSearchConduitAPIMethod.php
@@ -0,0 +1,18 @@
+<?php
+
+final class DifferentialRevisionSearchConduitAPIMethod
+ extends PhabricatorSearchEngineAPIMethod {
+
+ public function getAPIMethodName() {
+ return 'differential.revision.search';
+ }
+
+ public function newSearchEngine() {
+ return new DifferentialRevisionSearchEngine();
+ }
+
+ public function getMethodSummary() {
+ return pht('Read information about revisions.');
+ }
+
+}
diff --git a/src/applications/differential/storage/DifferentialRevision.php b/src/applications/differential/storage/DifferentialRevision.php
--- a/src/applications/differential/storage/DifferentialRevision.php
+++ b/src/applications/differential/storage/DifferentialRevision.php
@@ -14,7 +14,8 @@
PhabricatorMentionableInterface,
PhabricatorDestructibleInterface,
PhabricatorProjectInterface,
- PhabricatorFulltextInterface {
+ PhabricatorFulltextInterface,
+ PhabricatorConduitResultInterface {
protected $title = '';
protected $originalTitle;
@@ -635,4 +636,31 @@
}
+/* -( PhabricatorConduitResultInterface )---------------------------------- */
+
+
+ public function getFieldSpecificationsForConduit() {
+ return array(
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('title')
+ ->setType('string')
+ ->setDescription(pht('The revision title.')),
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('authorPHID')
+ ->setType('phid')
+ ->setDescription(pht('Revision author PHID.')),
+ );
+ }
+
+ public function getFieldValuesForConduit() {
+ return array(
+ 'title' => $this->getTitle(),
+ 'authorPHID' => $this->getAuthorPHID(),
+ );
+ }
+
+ public function getConduitSearchAttachments() {
+ return array();
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 25, 10:41 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7381492
Default Alt Text
D16089.id.diff (4 KB)
Attached To
Mode
D16089: Implement basic differential.revision.search
Attached
Detach File
Event Timeline
Log In to Comment