MediaWiki 1.42.1
Processor Interface Reference

Generic processor that reads associated arrays and registers whatever is required. More...

Inherited by ExtensionProcessor.

Public Member Functions

 extractInfo ( $path, array $info, $version)
 Main entry point, processes the information provided.
 
 getExtractedAutoloadInfo (bool $includeDev=false)
 Returns the extracted autoload info.
 
 getExtractedInfo ()
 
 getRequirements (array $info, $includeDev)
 Get the requirements for the provided info.
 

Detailed Description

Generic processor that reads associated arrays and registers whatever is required.

Since
1.25

Definition at line 9 of file Processor.php.

Member Function Documentation

◆ extractInfo()

Processor::extractInfo ( $path,
array $info,
$version )

Main entry point, processes the information provided.

Callers should call "callback" after calling this function.

Parameters
string$pathAbsolute path of JSON file
array$info
int$versionmanifest_version for info

Implemented in ExtensionProcessor.

◆ getExtractedAutoloadInfo()

Processor::getExtractedAutoloadInfo ( bool $includeDev = false)

Returns the extracted autoload info.

The autoload info is returned as an associative array with three keys:

  • files: a list of files to load, for use with Autoloader::loadFile()
  • classes: a map of class names to files, for use with Autoloader::registerClass()
  • namespaces: a map of namespace names to directories, for use with Autoloader::registerNamespace()
Since
1.39
Parameters
bool$includeDev
Returns
array[] The autoload info.

Implemented in ExtensionProcessor.

◆ getExtractedInfo()

Processor::getExtractedInfo ( )
Returns
array With following keys: 'globals' - variables to be set to $GLOBALS 'defines' - constants to define 'callbacks' - functions to be executed by the registry 'credits' - metadata to be stored by registry 'attributes' - registration info which isn't a global variable

◆ getRequirements()

Processor::getRequirements ( array $info,
$includeDev )

Get the requirements for the provided info.

Since
1.26
Parameters
array$info
bool$includeDev
Returns
array Where keys are the name to have a constraint on, like 'MediaWiki'. Values are a constraint string like "1.26.1".

Implemented in ExtensionProcessor.


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