MediaWiki REL1_39
Processor Interface Reference

Processors read associated arrays and register whatever is required. More...

Inheritance diagram for Processor:

Public Member Functions

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

Detailed Description

Processors read associated arrays and register 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.

◆ getExtraAutoloaderPaths()

Processor::getExtraAutoloaderPaths ( $dir,
array $info )

Get the path for additional autoloaders, e.g.

the one of Composer.

Deprecated
since 1.39, use getExtractedAutoloadInfo instead
Parameters
string$dir
array$info
Returns
array Containing the paths for autoloader file(s).
Since
1.27

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: