Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93165194
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
Tue, Nov 26, 17:17
Size
974 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 17:17 (2 d)
Engine
blob
Format
Raw Data
Handle
22585201
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