mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Rename Conduit classes
Summary: Ref T5655. Rename Conduit classes and provide a `getAPIMethodName` method to declare the API method. Test Plan: ``` > echo '{}' | arc --conduit-uri='http://phabricator.joshuaspence.com' call-conduit user.whoami Waiting for JSON parameters on stdin... {"error":null,"errorMessage":null,"response":{"phid":"PHID-USER-lioqffnwn6y475mu5ndb","userName":"josh","realName":"Joshua Spence","image":"http:\/\/phabricator.joshuaspence.com\/res\/1404425321T\/phabricator\/3eb28cd9\/rsrc\/image\/avatar.png","uri":"http:\/\/phabricator.joshuaspence.com\/p\/josh\/","roles":["admin","verified","approved","activated"]}} ``` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin, hach-que Maniphest Tasks: T5655 Differential Revision: https://secure.phabricator.com/D9991
This commit is contained in:
parent
b4d7a9de39
commit
023dee0d3b
175 changed files with 1224 additions and 765 deletions
1
.arclint
1
.arclint
|
@ -78,7 +78,6 @@
|
|||
"16": "advice",
|
||||
"34": "error"
|
||||
},
|
||||
"xhpast.naminghook": "PhabricatorSymbolNameLinter",
|
||||
"xhpast.php-version": "5.2.3",
|
||||
"xhpast.php-version.windows": "5.3.0"
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
|
||||
abstract class ArcanistConduitAPIMethod extends ConduitAPIMethod {}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_arcanist_projectinfo_Method
|
||||
extends ConduitAPI_arcanist_Method {
|
||||
final class ArcanistProjectInfoConduitAPIMethod
|
||||
extends ArcanistConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'arcanist.projectinfo';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Get information about Arcanist projects.';
|
|
@ -1,3 +0,0 @@
|
|||
<?php
|
||||
|
||||
abstract class ConduitAPI_arcanist_Method extends ConduitAPIMethod {}
|
9
src/applications/audit/conduit/AuditConduitAPIMethod.php
Normal file
9
src/applications/audit/conduit/AuditConduitAPIMethod.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
abstract class AuditConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
final public function getApplication() {
|
||||
return PhabricatorApplication::getByClass('PhabricatorApplicationAudit');
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_audit_query_Method extends ConduitAPI_audit_Method {
|
||||
final class AuditQueryConduitAPIMethod extends AuditConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'audit.query';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Query audit requests.';
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
abstract class ConduitAPI_audit_Method extends ConduitAPIMethod {
|
||||
|
||||
public function getApplication() {
|
||||
return PhabricatorApplication::getByClass('PhabricatorAuditApplication');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
abstract class ChatLogConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
final public function getApplication() {
|
||||
return PhabricatorApplication::getByClass('PhabricatorApplicationChatLog');
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_chatlog_query_Method extends ConduitAPI_chatlog_Method {
|
||||
final class ChatLogQueryConduitAPIMethod extends ChatLogConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'chatlog.query';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_UNSTABLE;
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_chatlog_record_Method extends ConduitAPI_chatlog_Method {
|
||||
final class ChatLogRecordConduitAPIMethod extends ChatLogConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'chatlog.record';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_UNSTABLE;
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
abstract class ConduitAPI_chatlog_Method extends ConduitAPIMethod {
|
||||
|
||||
public function getApplication() {
|
||||
return PhabricatorApplication::getByClass('PhabricatorChatLogApplication');
|
||||
}
|
||||
|
||||
}
|
|
@ -168,41 +168,19 @@ final class ConduitCall {
|
|||
return $servers[array_rand($servers)];
|
||||
}
|
||||
|
||||
protected function buildMethodHandler($method) {
|
||||
$method_class = ConduitAPIMethod::getClassNameFromAPIMethodName($method);
|
||||
protected function buildMethodHandler($method_name) {
|
||||
$method = ConduitAPIMethod::getConduitMethod($method_name);
|
||||
|
||||
// Test if the method exists.
|
||||
$ok = false;
|
||||
try {
|
||||
$ok = class_exists($method_class);
|
||||
} catch (Exception $ex) {
|
||||
// Discard, we provide a more specific exception below.
|
||||
}
|
||||
if (!$ok) {
|
||||
if (!$method) {
|
||||
throw new ConduitException(
|
||||
"Conduit method '{$method}' does not exist.");
|
||||
}
|
||||
|
||||
$class_info = new ReflectionClass($method_class);
|
||||
if ($class_info->isAbstract()) {
|
||||
throw new ConduitException(
|
||||
"Method '{$method}' is not valid; the implementation is an abstract ".
|
||||
"base class.");
|
||||
}
|
||||
|
||||
$method = newv($method_class, array());
|
||||
|
||||
if (!($method instanceof ConduitAPIMethod)) {
|
||||
throw new ConduitException(
|
||||
"Method '{$method_class}' is not valid; the implementation must be ".
|
||||
"a subclass of ConduitAPIMethod.");
|
||||
"Conduit method '{$method_name}' does not exist.");
|
||||
}
|
||||
|
||||
$application = $method->getApplication();
|
||||
if ($application && !$application->isInstalled()) {
|
||||
$app_name = $application->getName();
|
||||
throw new ConduitException(
|
||||
"Method '{$method_class}' belongs to application '{$app_name}', ".
|
||||
"Method '{$method_name}' belongs to application '{$app_name}', ".
|
||||
"which is not installed.");
|
||||
}
|
||||
|
||||
|
|
|
@ -18,9 +18,7 @@ abstract class ConduitAPIMethod
|
|||
abstract public function defineErrorTypes();
|
||||
abstract protected function execute(ConduitAPIRequest $request);
|
||||
|
||||
public function __construct() {
|
||||
|
||||
}
|
||||
public function __construct() {}
|
||||
|
||||
/**
|
||||
* This is mostly for compatibility with
|
||||
|
@ -67,9 +65,7 @@ abstract class ConduitAPIMethod
|
|||
return $this->execute($request);
|
||||
}
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return self::getAPIMethodNameFromClassName(get_class($this));
|
||||
}
|
||||
public abstract function getAPIMethodName();
|
||||
|
||||
/**
|
||||
* Return a key which sorts methods by application name, then method status,
|
||||
|
@ -94,9 +90,33 @@ abstract class ConduitAPIMethod
|
|||
return head(explode('.', $this->getAPIMethodName(), 2));
|
||||
}
|
||||
|
||||
public static function getClassNameFromAPIMethodName($method_name) {
|
||||
$method_fragment = str_replace('.', '_', $method_name);
|
||||
return 'ConduitAPI_'.$method_fragment.'_Method';
|
||||
public static function getConduitMethod($method_name) {
|
||||
static $method_map = null;
|
||||
|
||||
if ($method_map === null) {
|
||||
$methods = id(new PhutilSymbolLoader())
|
||||
->setAncestorClass(__CLASS__)
|
||||
->setConcreteOnly(true)
|
||||
->loadObjects();
|
||||
|
||||
foreach ($methods as $method) {
|
||||
$name = $method->getAPIMethodName();
|
||||
|
||||
if (empty($method_map[$name])) {
|
||||
$method_map[$name] = $method;
|
||||
continue;
|
||||
}
|
||||
|
||||
$orig_class = get_class($method_map[$name]);
|
||||
$this_class = get_class($method);
|
||||
throw new Exception(
|
||||
"Two Conduit API method classes ({$orig_class}, {$this_class}) ".
|
||||
"both have the same method name ({$name}). API methods ".
|
||||
"must have unique method names.");
|
||||
}
|
||||
}
|
||||
|
||||
return idx($method_map, $method_name);
|
||||
}
|
||||
|
||||
public function shouldRequireAuthentication() {
|
||||
|
@ -122,20 +142,6 @@ abstract class ConduitAPIMethod
|
|||
return null;
|
||||
}
|
||||
|
||||
public static function getAPIMethodNameFromClassName($class_name) {
|
||||
$match = null;
|
||||
$is_valid = preg_match(
|
||||
'/^ConduitAPI_(.*)_Method$/',
|
||||
$class_name,
|
||||
$match);
|
||||
if (!$is_valid) {
|
||||
throw new Exception(
|
||||
"Parameter '{$class_name}' is not a valid Conduit API method class.");
|
||||
}
|
||||
$method_fragment = $match[1];
|
||||
return str_replace('_', '.', $method_fragment);
|
||||
}
|
||||
|
||||
protected function formatStringConstants($constants) {
|
||||
foreach ($constants as $key => $value) {
|
||||
$constants[$key] = '"'.$value.'"';
|
||||
|
@ -153,9 +159,9 @@ abstract class ConduitAPIMethod
|
|||
*/
|
||||
protected function getPagerParamTypes() {
|
||||
return array(
|
||||
'before' => 'optional string',
|
||||
'after' => 'optional string',
|
||||
'limit' => 'optional int (default = 100)',
|
||||
'before' => 'optional string',
|
||||
'after' => 'optional string',
|
||||
'limit' => 'optional int (default = 100)',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -229,7 +235,7 @@ abstract class ConduitAPIMethod
|
|||
|
||||
public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
|
||||
if (!$this->shouldRequireAuthentication()) {
|
||||
// Make unauthenticated methods univerally visible.
|
||||
// Make unauthenticated methods universally visible.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -240,5 +246,4 @@ abstract class ConduitAPIMethod
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_conduit_connect_Method extends ConduitAPIMethod {
|
||||
final class ConduitConnectConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'conduit.connect';
|
||||
}
|
||||
|
||||
public function shouldRequireAuthentication() {
|
||||
return false;
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_conduit_getcertificate_Method extends ConduitAPIMethod {
|
||||
final class ConduitGetCertificateConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'conduit.getcertificate';
|
||||
}
|
||||
|
||||
public function shouldRequireAuthentication() {
|
||||
return false;
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_conduit_ping_Method extends ConduitAPIMethod {
|
||||
final class ConduitPingConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'conduit.ping';
|
||||
}
|
||||
|
||||
public function shouldRequireAuthentication() {
|
||||
return false;
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_conduit_query_Method extends ConduitAPIMethod {
|
||||
final class ConduitQueryConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'conduit.query';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Returns the parameters of the Conduit methods.';
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
abstract class ConduitAPI_conpherence_Method extends ConduitAPIMethod {
|
||||
abstract class ConpherenceConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
public function getApplication() {
|
||||
final public function getApplication() {
|
||||
return PhabricatorApplication::getByClass(
|
||||
'PhabricatorConpherenceApplication');
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_conpherence_createthread_Method
|
||||
extends ConduitAPI_conpherence_Method {
|
||||
final class ConpherenceCreateThreadConduitAPIMethod
|
||||
extends ConpherenceConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'conpherence.createthread';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Create a new conpherence thread.');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_conpherence_querythread_Method
|
||||
extends ConduitAPI_conpherence_Method {
|
||||
final class ConpherenceQueryThreadConduitAPIMethod
|
||||
extends ConpherenceConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'conpherence.querythread';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht(
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_conpherence_querytransaction_Method
|
||||
extends ConduitAPI_conpherence_Method {
|
||||
final class ConpherenceQueryTransactionConduitAPIMethod
|
||||
extends ConpherenceConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'conpherence.querytransaction';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht(
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_conpherence_updatethread_Method
|
||||
extends ConduitAPI_conpherence_Method {
|
||||
final class ConpherenceUpdateThreadConduitAPIMethod
|
||||
extends ConpherenceConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'conpherence.updatethread';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Update an existing conpherence thread.');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_close_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialCloseConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.close';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Close a Differential revision.');
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
abstract class ConduitAPI_differential_Method extends ConduitAPIMethod {
|
||||
abstract class DifferentialConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
public function getApplication() {
|
||||
final public function getApplication() {
|
||||
return PhabricatorApplication::getByClass(
|
||||
'PhabricatorDifferentialApplication');
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_createcomment_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialCreateCommentConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.createcomment';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Add a comment to a Differential revision.');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_creatediff_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialCreateDiffConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.creatediff';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Create a new Differential diff.';
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_createinline_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialCreateInlineConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.createinline';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Add an inline comment to a Differential revision.';
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_createrawdiff_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialCreateRawDiffConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.createrawdiff';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Create a new Differential diff from a raw diff source.');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_createrevision_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialCreateRevisionConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.createrevision';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Create a new Differential revision.');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_find_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialFindConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.find';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_DEPRECATED;
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_finishpostponedlinters_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialFinishPostponedLintersConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.finishpostponedlinters';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Update diff with new lint messages and mark postponed '.
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_getalldiffs_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialGetAllDiffsConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.getalldiffs';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_DEPRECATED;
|
||||
|
@ -52,4 +56,5 @@ final class ConduitAPI_differential_getalldiffs_Method
|
|||
|
||||
return $results;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_getcommitmessage_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialGetCommitMessageConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.getcommitmessage';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Retrieve Differential commit messages or message templates.';
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_getcommitpaths_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialGetCommitPathsConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.getcommitpaths';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Query which paths should be included when committing a '.
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_getdiff_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialGetDiffConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.getdiff';
|
||||
}
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_getrawdiff_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialGetRawDiffConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.getrawdiff';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Retrieve a raw diff');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_getrevisioncomments_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialGetRevisionCommentsConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.getrevisioncomments';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_DEPRECATED;
|
||||
|
@ -86,4 +90,5 @@ final class ConduitAPI_differential_getrevisioncomments_Method
|
|||
|
||||
return $results;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_getrevision_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialGetRevisionConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.getrevision';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_DEPRECATED;
|
|
@ -1,10 +1,14 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_parsecommitmessage_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialParseCommitMessageConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
private $errors;
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.parsecommitmessage';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Parse commit messages for Differential fields.');
|
||||
}
|
||||
|
@ -128,5 +132,4 @@ final class ConduitAPI_differential_parsecommitmessage_Method
|
|||
return $result;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_query_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialQueryConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.query';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Query Differential revisions which match certain criteria.';
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_querydiffs_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialQueryDiffsConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.querydiffs';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Query differential diffs which match certain criteria.');
|
||||
|
@ -39,4 +43,5 @@ final class ConduitAPI_differential_querydiffs_Method
|
|||
|
||||
return mpull($diffs, 'getDiffDict', 'getID');
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_setdiffproperty_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialSetDiffPropertyConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.setdiffproperty';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Attach properties to Differential diffs.';
|
||||
|
@ -107,4 +111,5 @@ final class ConduitAPI_differential_setdiffproperty_Method
|
|||
$property->save();
|
||||
return $property;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_updaterevision_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialUpdateRevisionConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.updaterevision';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Update a Differential revision.');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_differential_updateunitresults_Method
|
||||
extends ConduitAPI_differential_Method {
|
||||
final class DifferentialUpdateUnitResultsConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.updateunitresults';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Update arc unit results for a postponed test.';
|
||||
|
@ -145,4 +149,5 @@ final class ConduitAPI_differential_updateunitresults_Method
|
|||
$diff->setUnitStatus($final_diff_status);
|
||||
$diff->save();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
<?php
|
||||
|
||||
abstract class ConduitAPI_diffusion_Method extends ConduitAPIMethod {
|
||||
|
||||
public function getApplication() {
|
||||
return PhabricatorApplication::getByClass(
|
||||
'PhabricatorDiffusionApplication');
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_branchquery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionBranchQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.branchquery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Determine what branches exist for a repository.');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_browsequery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionBrowseQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.browsequery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_commitparentsquery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionCommitParentsQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.commitparentsquery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht(
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
abstract class DiffusionConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
final public function getApplication() {
|
||||
return PhabricatorApplication::getByClass(
|
||||
'PhabricatorApplicationDiffusion');
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_createcomment_Method
|
||||
extends ConduitAPI_diffusion_Method {
|
||||
final class DiffusionCreateCommentConduitAPIMethod
|
||||
extends DiffusionConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.createcomment';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_DEPRECATED;
|
|
@ -1,10 +1,14 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_diffquery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionDiffQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
private $effectiveCommit;
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.diffquery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return
|
||||
'Get diff information from a repository for a specific path at an '.
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_existsquery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionExistsQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.existsquery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Determine if code exists in a version control system.';
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_filecontentquery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionFileContentQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.filecontentquery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Retrieve file content from a repository.';
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_findsymbols_Method
|
||||
extends ConduitAPI_diffusion_Method {
|
||||
final class DiffusionFindSymbolsConduitAPIMethod
|
||||
extends DiffusionConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.findsymbols';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Retrieve Diffusion symbol information.';
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_getcommits_Method
|
||||
extends ConduitAPI_diffusion_Method {
|
||||
final class DiffusionGetCommitsConduitAPIMethod
|
||||
extends DiffusionConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.getcommits';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Retrieve Diffusion commit information.');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_getlintmessages_Method
|
||||
extends ConduitAPI_diffusion_Method {
|
||||
final class DiffusionGetLintMessagesConduitAPIMethod
|
||||
extends DiffusionConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.getlintmessages';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_UNSTABLE;
|
|
@ -1,10 +1,14 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_getrecentcommitsbypath_Method
|
||||
extends ConduitAPI_diffusion_Method {
|
||||
final class DiffusionGetRecentCommitsByPathConduitAPIMethod
|
||||
extends DiffusionConduitAPIMethod {
|
||||
|
||||
const DEFAULT_LIMIT = 10;
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.getrecentcommitsbypath';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Get commit identifiers for recent commits affecting a given path.';
|
||||
}
|
|
@ -1,10 +1,14 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_historyquery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionHistoryQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
private $parents = array();
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.historyquery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Returns history information for a repository at a specific '.
|
||||
'commit and path.';
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_lastmodifiedquery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionLastModifiedQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.lastmodifiedquery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Get the commits at which paths were last modified.');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_looksoon_Method
|
||||
extends ConduitAPI_diffusion_Method {
|
||||
final class DiffusionLookSoonConduitAPIMethod
|
||||
extends DiffusionConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.looksoon';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_UNSTABLE;
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_mergedcommitsquery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionMergedCommitsQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.mergedcommitsquery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_querycommits_Method
|
||||
extends ConduitAPI_diffusion_Method {
|
||||
final class DiffusionQueryCommitsConduitAPIMethod
|
||||
extends DiffusionConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.querycommits';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Retrieve information about commits.');
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
abstract class ConduitAPI_diffusion_abstractquery_Method
|
||||
extends ConduitAPI_diffusion_Method {
|
||||
abstract class DiffusionQueryConduitAPIMethod
|
||||
extends DiffusionConduitAPIMethod {
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_querypaths_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionQueryPathsConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.querypaths';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Filename search on a repository.');
|
||||
|
@ -97,4 +101,5 @@ final class ConduitAPI_diffusion_querypaths_Method
|
|||
|
||||
return $results;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_rawdiffquery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionRawDiffQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.rawdiffquery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return
|
||||
|
@ -51,4 +55,5 @@ final class ConduitAPI_diffusion_rawdiffquery_Method
|
|||
|
||||
return $raw_query->loadRawDiff();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_readmequery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionReadmeQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.readmequery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_refsquery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionRefsQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.refsquery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_resolverefs_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionResolveRefsConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.resolverefsquery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Resolve references into stable, canonical identifiers.');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_searchquery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionSearchQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.searchquery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Search (grep) a repository at a specific path and commit.';
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_tagsquery_Method
|
||||
extends ConduitAPI_diffusion_abstractquery_Method {
|
||||
final class DiffusionTagsQueryConduitAPIMethod
|
||||
extends DiffusionQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.tagsquery';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Retrieve information about tags in a repository.');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_diffusion_updatecoverage_Method
|
||||
extends ConduitAPI_diffusion_Method {
|
||||
final class DiffusionUpdateCoverageConduitAPIMethod
|
||||
extends DiffusionConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'diffusion.updatecoverage';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_UNSTABLE;
|
||||
|
@ -93,5 +97,4 @@ final class ConduitAPI_diffusion_updatecoverage_Method
|
|||
$conn->saveTransaction();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
abstract class ConduitAPI_feed_Method extends ConduitAPIMethod {
|
||||
|
||||
public function getApplication() {
|
||||
return PhabricatorApplication::getByClass('PhabricatorFeedApplication');
|
||||
}
|
||||
|
||||
}
|
9
src/applications/feed/conduit/FeedConduitAPIMethod.php
Normal file
9
src/applications/feed/conduit/FeedConduitAPIMethod.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
abstract class FeedConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
final public function getApplication() {
|
||||
return PhabricatorApplication::getByClass('PhabricatorApplicationFeed');
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_feed_publish_Method extends ConduitAPI_feed_Method {
|
||||
final class FeedPublishConduitAPIMethod extends FeedConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'feed.publish';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_UNSTABLE;
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_feed_query_Method extends ConduitAPI_feed_Method {
|
||||
final class FeedQueryConduitAPIMethod extends FeedConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'feed.query';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_UNSTABLE;
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
abstract class ConduitAPI_file_Method extends ConduitAPIMethod {
|
||||
|
||||
public function getApplication() {
|
||||
return PhabricatorApplication::getByClass('PhabricatorFilesApplication');
|
||||
}
|
||||
|
||||
}
|
9
src/applications/files/conduit/FileConduitAPIMethod.php
Normal file
9
src/applications/files/conduit/FileConduitAPIMethod.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
abstract class FileConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
final public function getApplication() {
|
||||
return PhabricatorApplication::getByClass('PhabricatorApplicationFiles');
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_file_download_Method extends ConduitAPI_file_Method {
|
||||
final class FileDownloadConduitAPIMethod extends FileConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'file.download';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Download a file from the server.';
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_file_info_Method extends ConduitAPI_file_Method {
|
||||
final class FileInfoConduitAPIMethod extends FileConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'file.info';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Get information about a file.';
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_file_upload_Method extends ConduitAPI_file_Method {
|
||||
final class FileUploadConduitAPIMethod extends FileConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'file.upload';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Upload a file to the server.';
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_file_uploadhash_Method extends ConduitAPI_file_Method {
|
||||
final class FileUploadHashConduitAPIMethod extends FileConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'file.uploadhash';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Upload a file to the server using content hash.';
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
abstract class ConduitAPI_flag_Method extends ConduitAPIMethod {
|
||||
abstract class FlagConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
public function getApplication() {
|
||||
final public function getApplication() {
|
||||
return PhabricatorApplication::getByClass('PhabricatorFlagsApplication');
|
||||
}
|
||||
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_flag_delete_Method extends ConduitAPI_flag_Method {
|
||||
final class FlagDeleteConduitAPIMethod extends FlagConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'flag.delete';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Clear a flag.';
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_flag_edit_Method extends ConduitAPI_flag_Method {
|
||||
final class FlagEditConduitAPIMethod extends FlagConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'flag.edit';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Create or modify a flag.';
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_flag_query_Method extends ConduitAPI_flag_Method {
|
||||
final class FlagQueryConduitAPIMethod extends FlagConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'flag.query';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Query flag markers.';
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
abstract class ConduitAPI_harbormaster_Method extends ConduitAPIMethod {
|
||||
abstract class HarbormasterConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
public function getApplication() {
|
||||
final public function getApplication() {
|
||||
return PhabricatorApplication::getByClass(
|
||||
'PhabricatorHarbormasterApplication');
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_harbormaster_querybuildables_Method
|
||||
extends ConduitAPI_harbormaster_Method {
|
||||
final class HarbormasterQueryBuildablesConduitAPIMethod
|
||||
extends HarbormasterConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'harbormaster.querybuildables';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Query Harbormaster buildables.');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_harbormaster_querybuilds_Method
|
||||
extends ConduitAPI_harbormaster_Method {
|
||||
final class HarbormasterQueryBuildsConduitAPIMethod
|
||||
extends HarbormasterConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'harbormaster.querybuilds';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Query Harbormaster builds.');
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_harbormaster_sendmessage_Method
|
||||
extends ConduitAPI_harbormaster_Method {
|
||||
final class HarbormasterSendMessageConduitAPIMethod
|
||||
extends HarbormasterConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'harbormaster.sendmessage';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht(
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
abstract class ConduitAPI_macro_Method extends ConduitAPIMethod {
|
||||
|
||||
public function getApplication() {
|
||||
return PhabricatorApplication::getByClass('PhabricatorMacroApplication');
|
||||
}
|
||||
|
||||
}
|
9
src/applications/macro/conduit/MacroConduitAPIMethod.php
Normal file
9
src/applications/macro/conduit/MacroConduitAPIMethod.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
abstract class MacroConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
final public function getApplication() {
|
||||
return PhabricatorApplication::getByClass('PhabricatorApplicationMacro');
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_macro_creatememe_Method extends ConduitAPI_macro_Method {
|
||||
final class MacroCreateMemeConduitAPIMethod extends MacroConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'macro.creatememe';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_UNSTABLE;
|
|
@ -1,6 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_macro_query_Method extends ConduitAPI_macro_Method {
|
||||
final class MacroQueryConduitAPIMethod extends MacroConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'macro.query';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Retrieve image macro information.';
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
abstract class ConduitAPI_maniphest_Method extends ConduitAPIMethod {
|
||||
abstract class ManiphestConduitAPIMethod extends ConduitAPIMethod {
|
||||
|
||||
public function getApplication() {
|
||||
final public function getApplication() {
|
||||
return PhabricatorApplication::getByClass(
|
||||
'PhabricatorManiphestApplication');
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_maniphest_createtask_Method
|
||||
extends ConduitAPI_maniphest_Method {
|
||||
final class ManiphestCreateTaskConduitAPIMethod
|
||||
extends ManiphestConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'maniphest.createtask';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Create a new Maniphest task.';
|
||||
|
@ -17,7 +21,7 @@ final class ConduitAPI_maniphest_createtask_Method
|
|||
|
||||
public function defineErrorTypes() {
|
||||
return array(
|
||||
'ERR-INVALID-PARAMETER' => 'Missing or malformed parameter.'
|
||||
'ERR-INVALID-PARAMETER' => 'Missing or malformed parameter.',
|
||||
);
|
||||
}
|
||||
|
|
@ -3,8 +3,12 @@
|
|||
/**
|
||||
* @concrete-extensible
|
||||
*/
|
||||
final class ConduitAPI_maniphest_find_Method
|
||||
extends ConduitAPI_maniphest_query_Method {
|
||||
final class ManiphestFindConduitAPIMethod
|
||||
extends ManiphestQueryConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'maniphest.find';
|
||||
}
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_DEPRECATED;
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_maniphest_gettasktransactions_Method
|
||||
extends ConduitAPI_maniphest_Method {
|
||||
final class ManiphestGetTaskTransactionsConduitAPIMethod
|
||||
extends ManiphestConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'maniphest.gettasktransactions';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Retrieve Maniphest Task Transactions.';
|
|
@ -1,7 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ConduitAPI_maniphest_info_Method
|
||||
extends ConduitAPI_maniphest_Method {
|
||||
final class ManiphestInfoConduitAPIMethod extends ManiphestConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'maniphest.info';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Retrieve information about a Maniphest task, given its id.';
|
|
@ -5,7 +5,11 @@
|
|||
*
|
||||
* @concrete-extensible
|
||||
*/
|
||||
class ConduitAPI_maniphest_query_Method extends ConduitAPI_maniphest_Method {
|
||||
class ManiphestQueryConduitAPIMethod extends ManiphestConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'maniphest.query';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Execute complex searches for Maniphest tasks.';
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue