MediaWiki master
MediaWiki\Rest\Module\ModuleInfo Class Reference

Encapsulates resolved information about a REST module. More...

Public Member Functions

 __construct (string $id, ModuleMode $availability, bool $isExternal, ?string $title, ?string $description, ?string $version, ?string $oadSpecPath, array $groups, ?string $externalBaseUrl=null, ?string $externalSpecUrl=null)
 getAvailability ()
 getDescription ()
 getExternalBaseUrl ()
 Gets the configured base URL for an external module.
 getExternalSpecUrl ()
 Gets the configured spec URL for an external module.
 getGroups ()
 getId ()
 getLocalDescriptionSpecPath ()
 Gets the relative path to the module's OpenAPI OAD spec.
 getTitle ()
 getVersion ()
 isExternal ()

Detailed Description

Encapsulates resolved information about a REST module.

Since
1.47

Definition at line 10 of file ModuleInfo.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Rest\Module\ModuleInfo::__construct ( string $id,
ModuleMode $availability,
bool $isExternal,
?string $title,
?string $description,
?string $version,
?string $oadSpecPath,
array $groups,
?string $externalBaseUrl = null,
?string $externalSpecUrl = null )
Parameters
string$idThe module ID (e.g., 'site/v1' or '' for prefix-less)
ModuleMode$availabilityThe module availability
bool$isExternalWhether the module is external or local
?string$titleThe display name of the module
?string$descriptionThe description of the module
?string$versionThe version string
?string$oadSpecPathModule-relative OAD spec path (e.g. '/openapi.json'), or, null
string[]$groupsThe audience designation groups
?string$externalBaseUrlThe external base URL, or null for local modules
?string$externalSpecUrlThe external spec URL, or null for local modules

Definition at line 34 of file ModuleInfo.php.

References isExternal().

Member Function Documentation

◆ getAvailability()

MediaWiki\Rest\Module\ModuleInfo::getAvailability ( )

Definition at line 62 of file ModuleInfo.php.

References return.

◆ getDescription()

MediaWiki\Rest\Module\ModuleInfo::getDescription ( )

Definition at line 74 of file ModuleInfo.php.

References return.

◆ getExternalBaseUrl()

MediaWiki\Rest\Module\ModuleInfo::getExternalBaseUrl ( )

Gets the configured base URL for an external module.

Null for local modules.

Returns
string|null

Definition at line 107 of file ModuleInfo.php.

References return.

◆ getExternalSpecUrl()

MediaWiki\Rest\Module\ModuleInfo::getExternalSpecUrl ( )

Gets the configured spec URL for an external module.

Null for local modules.

Returns
string|null

Definition at line 118 of file ModuleInfo.php.

References return.

◆ getGroups()

MediaWiki\Rest\Module\ModuleInfo::getGroups ( )
Returns
string[]

Definition at line 96 of file ModuleInfo.php.

References return.

◆ getId()

MediaWiki\Rest\Module\ModuleInfo::getId ( )

Definition at line 58 of file ModuleInfo.php.

References return.

◆ getLocalDescriptionSpecPath()

MediaWiki\Rest\Module\ModuleInfo::getLocalDescriptionSpecPath ( )

Gets the relative path to the module's OpenAPI OAD spec.

Null for external modules or local modules using the default generated description.

Returns
string|null

Definition at line 89 of file ModuleInfo.php.

References return.

◆ getTitle()

MediaWiki\Rest\Module\ModuleInfo::getTitle ( )

Definition at line 70 of file ModuleInfo.php.

References return.

◆ getVersion()

MediaWiki\Rest\Module\ModuleInfo::getVersion ( )

Definition at line 78 of file ModuleInfo.php.

References return.

◆ isExternal()

MediaWiki\Rest\Module\ModuleInfo::isExternal ( )

Definition at line 66 of file ModuleInfo.php.

References isExternal(), and return.

Referenced by __construct(), and isExternal().


The documentation for this class was generated from the following file: