Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F118118534
DiffusionBranchInformation.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, Jun 17, 20:22
Size
992 B
Mime Type
text/x-php
Expires
Thu, Jun 19, 20:22 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
26603392
Attached To
rPH Phabricator
DiffusionBranchInformation.php
View Options
<?php
final
class
DiffusionBranchInformation
{
const
DEFAULT_GIT_REMOTE
=
'origin'
;
private
$name
;
private
$headCommitIdentifier
;
public
function
setName
(
$name
)
{
$this
->
name
=
$name
;
return
$this
;
}
public
function
getName
()
{
return
$this
->
name
;
}
public
function
setHeadCommitIdentifier
(
$head_commit_identifier
)
{
$this
->
headCommitIdentifier
=
$head_commit_identifier
;
return
$this
;
}
public
function
getHeadCommitIdentifier
()
{
return
$this
->
headCommitIdentifier
;
}
public
static
function
newFromConduit
(
array
$dicts
)
{
$branches
=
array
();
foreach
(
$dicts
as
$dict
)
{
$branches
[]
=
id
(
new
DiffusionBranchInformation
())
->
setName
(
$dict
[
'name'
])
->
setHeadCommitIdentifier
(
$dict
[
'headCommitIdentifier'
]);
}
return
$branches
;
}
public
function
toDictionary
()
{
return
array
(
'name'
=>
$this
->
getName
(),
'headCommitIdentifier'
=>
$this
->
getHeadCommitIdentifier
()
);
}
}
Event Timeline
Log In to Comment