Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7420063
Env.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
Env.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Wikimedia\Parsoid\Config\Api
;
use
Wikimedia\Parsoid\Config\Env
as
IEnv
;
use
Wikimedia\Parsoid\Config\StubMetadataCollector
;
/**
* An Env accessing MediaWiki via its Action API
*
* Note this is intended for testing, not performance.
*/
class
Env
extends
IEnv
{
/**
* @param array $opts In addition to those from the parent class,
* - log: (bool) If true, write log data to stderr.
* - apiEndpoint: (string) URL for api.php. Required.
* - title: (string) Page being parsed. Required.
* - apiTimeout: (int) Timeout, in sections. Default 60.
* - userAgent: (string) User agent prefix.
*/
public
function
__construct
(
array
$opts
)
{
$api
=
new
ApiHelper
(
$opts
);
$siteConfig
=
new
SiteConfig
(
$api
,
$opts
);
$pageConfig
=
new
PageConfig
(
$api
,
$siteConfig
,
$opts
);
$dataAccess
=
new
DataAccess
(
$api
,
$siteConfig
,
$opts
);
$metadata
=
new
StubMetadataCollector
(
$siteConfig
);
parent
::
__construct
(
$siteConfig
,
$pageConfig
,
$dataAccess
,
$metadata
,
$opts
);
}
// Narrow inherited type; see
// https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters
/** @return SiteConfig */
public
function
getSiteConfig
():
\Wikimedia\Parsoid\Config\SiteConfig
{
// @phan-suppress-next-line PhanTypeMismatchReturnSuperType
return
parent
::
getSiteConfig
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 04:49 (1 d, 2 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
90/9b/2abba5e5d7a4730a41332db06b4f
Default Alt Text
Env.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment