Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99015365
ConduitAPI_differential_updatetaskrevisionassoc_Method.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jan 18, 11:54
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Jan 20, 11:54 (1 d, 16 h)
Engine
blob
Format
Raw Data
Handle
23687815
Attached To
rPH Phabricator
ConduitAPI_differential_updatetaskrevisionassoc_Method.php
View Options
<?php
/**
* @group conduit
*/
final
class
ConduitAPI_differential_updatetaskrevisionassoc_Method
extends
ConduitAPIMethod
{
public
function
getMethodStatus
()
{
return
self
::
METHOD_STATUS_DEPRECATED
;
}
public
function
getMethodStatusDescription
()
{
return
"This method should not really exist. Pretend it doesn't."
;
}
public
function
getMethodDescription
()
{
return
"Given a task together with its original and new associated "
.
"revisions, update the revisions for their attached_tasks."
;
}
public
function
defineParamTypes
()
{
return
array
(
'task_phid'
=>
'required nonempty string'
,
'orig_rev_phids'
=>
'required list<string>'
,
'new_rev_phids'
=>
'required list<string>'
,
);
}
public
function
defineReturnType
()
{
return
'void'
;
}
public
function
defineErrorTypes
()
{
return
array
(
'ERR_NO_TASKATTACHER_DEFINED'
=>
'No task attacher defined.'
,
);
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$task_phid
=
$request
->
getValue
(
'task_phid'
);
$orig_rev_phids
=
$request
->
getValue
(
'orig_rev_phids'
);
if
(
empty
(
$orig_rev_phids
))
{
$orig_rev_phids
=
array
();
}
$new_rev_phids
=
$request
->
getValue
(
'new_rev_phids'
);
if
(
empty
(
$new_rev_phids
))
{
$new_rev_phids
=
array
();
}
try
{
$task_attacher
=
PhabricatorEnv
::
newObjectFromConfig
(
'differential.attach-task-class'
);
$task_attacher
->
updateTaskRevisionAssoc
(
$task_phid
,
$orig_rev_phids
,
$new_rev_phids
);
}
catch
(
ReflectionException
$ex
)
{
throw
new
ConduitException
(
'ERR_NO_TASKATTACHER_DEFINED'
);
}
}
}
Event Timeline
Log In to Comment