Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F12660935
ArcanistRevisionRef.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
ArcanistRevisionRef.php
View Options
<?php
final
class
ArcanistRevisionRef
extends
ArcanistRef
implements
ArcanistDisplayRefInterface
{
const
HARDPOINT_COMMITMESSAGE
=
'ref.revision.commitmessage'
;
private
$parameters
;
private
$sources
=
array
();
public
function
getRefDisplayName
()
{
return
pht
(
'Revision %s'
,
$this
->
getMonogram
());
}
protected
function
newHardpoints
()
{
return
array
(
$this
->
newHardpoint
(
self
::
HARDPOINT_COMMITMESSAGE
),
);
}
public
static
function
newFromConduit
(
array
$dict
)
{
$ref
=
new
self
();
$ref
->
parameters
=
$dict
;
return
$ref
;
}
public
function
getMonogram
()
{
return
'D'
.
$this
->
getID
();
}
public
function
getStatusDisplayName
()
{
return
idx
(
$this
->
parameters
,
'statusName'
);
}
public
function
isClosed
()
{
// TODO: This should use sensible constants, not English language
// display text.
switch
(
$this
->
getStatusDisplayName
())
{
case
'Abandoned'
:
case
'Closed'
:
return
true
;
}
return
false
;
}
public
function
getURI
()
{
return
idx
(
$this
->
parameters
,
'uri'
);
}
public
function
getFullName
()
{
return
pht
(
'%s: %s'
,
$this
->
getMonogram
(),
$this
->
getName
());
}
public
function
getID
()
{
return
(
int
)
idx
(
$this
->
parameters
,
'id'
);
}
public
function
getPHID
()
{
return
idx
(
$this
->
parameters
,
'phid'
);
}
public
function
getName
()
{
return
idx
(
$this
->
parameters
,
'title'
);
}
public
function
getAuthorPHID
()
{
return
idx
(
$this
->
parameters
,
'authorPHID'
);
}
public
function
addSource
(
ArcanistRevisionRefSource
$source
)
{
$this
->
sources
[]
=
$source
;
return
$this
;
}
public
function
getSources
()
{
return
$this
->
sources
;
}
public
function
getCommitMessage
()
{
return
$this
->
getHardpoint
(
self
::
HARDPOINT_COMMITMESSAGE
);
}
public
function
getDisplayRefObjectName
()
{
return
$this
->
getMonogram
();
}
public
function
getDisplayRefTitle
()
{
return
$this
->
getName
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 28, 15:42 (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1052283
Default Alt Text
ArcanistRevisionRef.php (1 KB)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline
Log In to Comment