Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93171722
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
Tue, Nov 26, 18:22
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Nov 28, 18:22 (2 d)
Engine
blob
Format
Raw Data
Handle
22586397
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