Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F76458860
PhabricatorRepositoryType.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
Thu, Aug 8, 02:23
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Aug 10, 02:23 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19716317
Attached To
rPH Phabricator
PhabricatorRepositoryType.php
View Options
<?php
final
class
PhabricatorRepositoryType
extends
Phobject
{
const
REPOSITORY_TYPE_GIT
=
'git'
;
const
REPOSITORY_TYPE_SVN
=
'svn'
;
const
REPOSITORY_TYPE_MERCURIAL
=
'hg'
;
public
static
function
getAllRepositoryTypes
()
{
$map
=
self
::
getRepositoryTypeMap
();
return
ipull
(
$map
,
'name'
);
}
public
static
function
getNameForRepositoryType
(
$type
)
{
$spec
=
self
::
getRepositoryTypeSpec
(
$type
);
return
idx
(
$spec
,
'name'
,
pht
(
'Unknown ("%s")'
,
$type
));
}
public
static
function
getRepositoryTypeSpec
(
$type
)
{
$map
=
self
::
getRepositoryTypeMap
();
return
idx
(
$map
,
$type
,
array
());
}
public
static
function
getRepositoryTypeMap
()
{
return
array
(
self
::
REPOSITORY_TYPE_GIT
=>
array
(
'name'
=>
pht
(
'Git'
),
'icon'
=>
'fa-git'
,
'image'
=>
'repo/repo-git.png'
,
'create.header'
=>
pht
(
'Create Git Repository'
),
'create.subheader'
=>
pht
(
'Create a new Git repository.'
),
),
self
::
REPOSITORY_TYPE_MERCURIAL
=>
array
(
'name'
=>
pht
(
'Mercurial'
),
'icon'
=>
'fa-code-fork'
,
'image'
=>
'repo/repo-hg.png'
,
'create.header'
=>
pht
(
'Create Mercurial Repository'
),
'create.subheader'
=>
pht
(
'Create a new Mercurial repository.'
),
),
self
::
REPOSITORY_TYPE_SVN
=>
array
(
'name'
=>
pht
(
'Subversion'
),
'icon'
=>
'fa-database'
,
'image'
=>
'repo/repo-svn.png'
,
'create.header'
=>
pht
(
'Create Subversion Repository'
),
'create.subheader'
=>
pht
(
'Create a new Subversion repository.'
),
),
);
}
}
Event Timeline
Log In to Comment