Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93633513
PhabricatorGuidanceMessage.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
Sat, Nov 30, 07:44
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Dec 2, 07:44 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22677565
Attached To
rPH Phabricator
PhabricatorGuidanceMessage.php
View Options
<?php
final
class
PhabricatorGuidanceMessage
extends
Phobject
{
private
$key
;
private
$message
;
private
$severity
=
self
::
SEVERITY_NOTICE
;
private
$priority
=
1000
;
const
SEVERITY_NOTICE
=
'notice'
;
const
SEVERITY_WARNING
=
'warning'
;
public
function
setSeverity
(
$severity
)
{
$this
->
severity
=
$severity
;
return
$this
;
}
public
function
getSeverity
()
{
return
$this
->
severity
;
}
public
function
setKey
(
$key
)
{
$this
->
key
=
$key
;
return
$this
;
}
public
function
getKey
()
{
return
$this
->
key
;
}
public
function
setMessage
(
$message
)
{
$this
->
message
=
$message
;
return
$this
;
}
public
function
getMessage
()
{
return
$this
->
message
;
}
public
function
getSortVector
()
{
return
id
(
new
PhutilSortVector
())
->
addInt
(
$this
->
getPriority
());
}
public
function
setPriority
(
$priority
)
{
$this
->
priority
=
$priority
;
return
$this
;
}
public
function
getPriority
()
{
return
$this
->
priority
;
}
public
function
getSeverityStrength
()
{
$map
=
array
(
self
::
SEVERITY_NOTICE
=>
1
,
self
::
SEVERITY_WARNING
=>
2
,
);
return
idx
(
$map
,
$this
->
getSeverity
(),
0
);
}
}
Event Timeline
Log In to Comment