Differential D12380 Diff 29771 src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php
<?php | <?php | ||||
final class DifferentialCreateDiffConduitAPIMethod | final class DifferentialCreateDiffConduitAPIMethod | ||||
extends DifferentialConduitAPIMethod { | extends DifferentialConduitAPIMethod { | ||||
public function getAPIMethodName() { | public function getAPIMethodName() { | ||||
return 'differential.creatediff'; | return 'differential.creatediff'; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return 'Create a new Differential diff.'; | return 'Create a new Differential diff.'; | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
$vcs_const = $this->formatStringConstants( | $vcs_const = $this->formatStringConstants( | ||||
array( | array( | ||||
'svn', | 'svn', | ||||
'git', | 'git', | ||||
'hg', | 'hg', | ||||
)); | )); | ||||
Show All 23 Lines | return array( | ||||
'repositoryPHID' => 'optional phid', | 'repositoryPHID' => 'optional phid', | ||||
'parentRevisionID' => 'deprecated', | 'parentRevisionID' => 'deprecated', | ||||
'authorPHID' => 'deprecated', | 'authorPHID' => 'deprecated', | ||||
'repositoryUUID' => 'deprecated', | 'repositoryUUID' => 'deprecated', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'nonempty dict'; | return 'nonempty dict'; | ||||
} | } | ||||
public function defineErrorTypes() { | |||||
return array( | |||||
); | |||||
} | |||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$viewer = $request->getUser(); | $viewer = $request->getUser(); | ||||
$change_data = $request->getValue('changes'); | $change_data = $request->getValue('changes'); | ||||
$changes = array(); | $changes = array(); | ||||
foreach ($change_data as $dict) { | foreach ($change_data as $dict) { | ||||
$changes[] = ArcanistDiffChange::newFromDictionary($dict); | $changes[] = ArcanistDiffChange::newFromDictionary($dict); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |