Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F423612
PhabricatorSyntaxStyle.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorSyntaxStyle.php
View Options
<?php
abstract
class
PhabricatorSyntaxStyle
extends
Phobject
{
abstract
public
function
getStyleName
();
abstract
public
function
getStyleMap
();
final
public
function
getStyleOrder
()
{
return
(
string
)
id
(
new
PhutilSortVector
())
->
addInt
(
$this
->
isDefaultStyle
()
?
0
:
1
)
->
addString
(
$this
->
getStyleName
());
}
final
public
function
getSyntaxStyleKey
()
{
return
$this
->
getPhobjectClassConstant
(
'STYLEKEY'
);
}
final
public
function
isDefaultStyle
()
{
return
(
$this
->
getSyntaxStyleKey
()
==
'default'
);
}
public
static
function
getAllStyles
()
{
return
id
(
new
PhutilClassMapQuery
())
->
setAncestorClass
(
__CLASS__
)
->
setUniqueMethod
(
'getSyntaxStyleKey'
)
->
setSortMethod
(
'getStyleName'
)
->
execute
();
}
final
public
function
getRemarkupStyleMap
()
{
$map
=
array
(
'rbw_r'
=>
'color: red'
,
'rbw_o'
=>
'color: orange'
,
'rbw_y'
=>
'color: yellow'
,
'rbw_g'
=>
'color: green'
,
'rbw_b'
=>
'color: blue'
,
'rbw_i'
=>
'color: indigo'
,
'rbw_v'
=>
'color: violet'
,
);
return
$map
+
$this
->
getStyleMap
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, May 2, 6:12 PM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
57182
Default Alt Text
PhabricatorSyntaxStyle.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment