Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 1
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace MediaWiki\Registration;
4
5/**
6 * Generic processor that reads associated arrays and registers whatever is required.
7 *
8 * @ingroup ExtensionRegistry
9 * @since 1.25
10 */
11interface Processor {
12
13    /**
14     * Main entry point, processes the information
15     * provided.
16     * Callers should call "callback" after calling
17     * this function.
18     *
19     * @param string $path Absolute path of JSON file
20     * @param array $info
21     * @param int $version manifest_version for info
22     */
23    public function extractInfo( $path, array $info, $version );
24
25    /**
26     * @return array With following keys:
27     *     'globals' - variables to be set to $GLOBALS
28     *     'defines' - constants to define
29     *     'callbacks' - functions to be executed by the registry
30     *     'credits' - metadata to be stored by registry
31     *     'attributes' - registration info which isn't a global variable
32     */
33    public function getExtractedInfo();
34
35    /**
36     * Get the requirements for the provided info
37     *
38     * @since 1.26
39     *
40     * @param array $info
41     * @param bool $includeDev
42     *
43     * @return array Where keys are the name to have a constraint on,
44     *         like 'MediaWiki'. Values are a constraint string like "1.26.1".
45     */
46    public function getRequirements( array $info, $includeDev );
47
48    /**
49     * Returns the extracted autoload info.
50     * The autoload info is returned as an associative array with three keys:
51     * - files: a list of files to load, for use with Autoloader::loadFile()
52     * - classes: a map of class names to files, for use with Autoloader::registerClass()
53     * - namespaces: a map of namespace names to directories, for use
54     *   with Autoloader::registerNamespace()
55     *
56     * @since 1.39
57     *
58     * @param bool $includeDev
59     *
60     * @return array[] The autoload info.
61     */
62    public function getExtractedAutoloadInfo( bool $includeDev = false ): array;
63}
64
65/** @deprecated class alias since 1.43 */
66class_alias( Processor::class, 'Processor' );