Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5962825
CallbackTask.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
CallbackTask.php
View Options
<?php
namespace
MediaWiki\Installer\Task
;
use
MediaWiki\Status\Status
;
use
Wikimedia\Message\MessageSpecifier
;
/**
* An installer task which calls a callback function
*
* @internal For use by the installer
*/
class
CallbackTask
extends
Task
{
/** @var string */
private
$name
;
/** @var MessageSpecifier|string|null */
private
$description
;
/** @var callable */
private
$callback
;
/** @var string|string[] */
private
$dependencies
;
/** @var string|string[] */
private
$aliases
;
/** @var bool */
private
$postInstall
;
/**
* @see \MediaWiki\Installer\Task\TaskFactory::create
* @param array $spec
*/
public
function
__construct
(
$spec
)
{
$this
->
name
=
$spec
[
'name'
];
$this
->
description
=
$spec
[
'description'
]
??
null
;
$this
->
callback
=
$spec
[
'callback'
];
$this
->
dependencies
=
$spec
[
'after'
]
??
[];
$this
->
aliases
=
$spec
[
'aliases'
]
??
[];
$this
->
postInstall
=
$spec
[
'postInstall'
]
??
false
;
}
public
function
getName
()
{
return
$this
->
name
;
}
public
function
getDescription
()
{
if
(
$this
->
description
!==
null
)
{
return
$this
->
description
;
}
return
parent
::
getDescription
();
}
public
function
getAliases
()
{
return
$this
->
aliases
;
}
public
function
getDependencies
()
{
return
$this
->
dependencies
;
}
public
function
isPostInstall
()
{
return
$this
->
postInstall
;
}
public
function
execute
():
Status
{
return
(
$this
->
callback
)(
$this
->
getContext
()
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 09:11 (1 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
0a/5a/d61669f85870ef4593358c423246
Default Alt Text
CallbackTask.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment