Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2896415
PhabricatorRepositoryType.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
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.'
)
,
)
,
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Jan 19 2025, 23:04 (6 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1129683
Default Alt Text
PhabricatorRepositoryType.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment