Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / registration / Processor.php
bloba4100bbc07aa7cee397fb0b2827792508072f44f
1 <?php
3 /**
4 * Processors read associated arrays and register
5 * whatever is required
7 * @since 1.25
8 */
9 interface Processor {
11 /**
12 * Main entry point, processes the information
13 * provided.
14 * Callers should call "callback" after calling
15 * this function.
17 * @param string $path Absolute path of JSON file
18 * @param array $info
19 * @param int $version manifest_version for info
20 * @return array "credits" information to store
22 public function extractInfo( $path, array $info, $version );
24 /**
25 * @return array With following keys:
26 * 'globals' - variables to be set to $GLOBALS
27 * 'defines' - constants to define
28 * 'callbacks' - functions to be executed by the registry
29 * 'credits' - metadata to be stored by registry
30 * 'attributes' - registration info which isn't a global variable
32 public function getExtractedInfo();
34 /**
35 * Get the requirements for the provided info
37 * @since 1.26
38 * @param array $info
39 * @return array Where keys are the name to have a constraint on,
40 * like 'MediaWiki'. Values are a constraint string like "1.26.1".
42 public function getRequirements( array $info );
44 /**
45 * Get the path for additional autoloaders, e.g. the one of Composer.
47 * @param string $dir
48 * @param array $info
49 * @return array Containing the paths for autoloader file(s).
50 * @since 1.27
52 public function getExtraAutoloaderPaths( $dir, array $info );