]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blob - includes/registration/Processor.php
MediaWiki 1.30.2
[autoinstalls/mediawiki.git] / includes / registration / Processor.php
1 <?php
2
3 /**
4  * Processors read associated arrays and register
5  * whatever is required
6  *
7  * @since 1.25
8  */
9 interface Processor {
10
11         /**
12          * Main entry point, processes the information
13          * provided.
14          * Callers should call "callback" after calling
15          * this function.
16          *
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
21          */
22         public function extractInfo( $path, array $info, $version );
23
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
31          */
32         public function getExtractedInfo();
33
34         /**
35          * Get the requirements for the provided info
36          *
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".
41          */
42         public function getRequirements( array $info );
43
44         /**
45          * Get the path for additional autoloaders, e.g. the one of Composer.
46          *
47          * @param string $dir
48          * @param array $info
49          * @return array Containing the paths for autoloader file(s).
50          * @since 1.27
51          */
52         public function getExtraAutoloaderPaths( $dir, array $info );
53 }