Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93627875
PhabricatorGuidanceEngineExtension.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, 06:37
Size
974 B
Mime Type
text/x-php
Expires
Mon, Dec 2, 06:37 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22676274
Attached To
rPH Phabricator
PhabricatorGuidanceEngineExtension.php
View Options
<?php
abstract
class
PhabricatorGuidanceEngineExtension
extends
Phobject
{
final
public
function
getExtensionKey
()
{
return
$this
->
getPhobjectClassConstant
(
'GUIDANCEKEY'
,
64
);
}
abstract
public
function
canGenerateGuidance
(
PhabricatorGuidanceContext
$context
);
abstract
public
function
generateGuidance
(
PhabricatorGuidanceContext
$context
);
public
function
didGenerateGuidance
(
PhabricatorGuidanceContext
$context
,
array
$guidance
)
{
return
$guidance
;
}
final
protected
function
newGuidance
(
$key
)
{
return
id
(
new
PhabricatorGuidanceMessage
())
->
setKey
(
$key
);
}
final
protected
function
newWarning
(
$key
)
{
return
$this
->
newGuidance
(
$key
)
->
setSeverity
(
PhabricatorGuidanceMessage
::
SEVERITY_WARNING
);
}
final
public
static
function
getAllExtensions
()
{
return
id
(
new
PhutilClassMapQuery
())
->
setAncestorClass
(
__CLASS__
)
->
setUniqueMethod
(
'getExtensionKey'
)
->
execute
();
}
}
Event Timeline
Log In to Comment