Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F109614400
ConduitAPI_differential_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
Tue, Apr 22, 17:07
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Apr 24, 17:07 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25643561
Attached To
rPH Phabricator
ConduitAPI_differential_Method.php
View Options
<?php
/**
* @group conduit
*/
abstract
class
ConduitAPI_differential_Method
extends
ConduitAPIMethod
{
public
function
getApplication
()
{
return
PhabricatorApplication
::
getByClass
(
'PhabricatorApplicationDifferential'
);
}
protected
function
buildDiffInfoDictionary
(
DifferentialDiff
$diff
)
{
$uri
=
'/differential/diff/'
.
$diff
->
getID
().
'/'
;
$uri
=
PhabricatorEnv
::
getProductionURI
(
$uri
);
return
array
(
'id'
=>
$diff
->
getID
(),
'uri'
=>
$uri
,
);
}
protected
function
buildInlineInfoDictionary
(
DifferentialInlineComment
$inline
,
DifferentialChangeset
$changeset
=
null
)
{
$file_path
=
null
;
$diff_id
=
null
;
if
(
$changeset
)
{
$file_path
=
$inline
->
getIsNewFile
()
?
$changeset
->
getFilename
()
:
$changeset
->
getOldFile
();
$diff_id
=
$changeset
->
getDiffID
();
}
return
array
(
'id'
=>
$inline
->
getID
(),
'authorPHID'
=>
$inline
->
getAuthorPHID
(),
'filePath'
=>
$file_path
,
'isNewFile'
=>
$inline
->
getIsNewFile
(),
'lineNumber'
=>
$inline
->
getLineNumber
(),
'lineLength'
=>
$inline
->
getLineLength
(),
'diffID'
=>
$diff_id
,
'content'
=>
$inline
->
getContent
(),
);
}
}
Event Timeline
Log In to Comment