Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3/**
4 * Generic processor that reads associated arrays and registers whatever is required.
5 *
6 * @ingroup ExtensionRegistry
7 * @since 1.25
8 */
9interface 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     */
21    public function extractInfo( $path, array $info, $version );
22
23    /**
24     * @return array With following keys:
25     *     'globals' - variables to be set to $GLOBALS
26     *     'defines' - constants to define
27     *     'callbacks' - functions to be executed by the registry
28     *     'credits' - metadata to be stored by registry
29     *     'attributes' - registration info which isn't a global variable
30     */
31    public function getExtractedInfo();
32
33    /**
34     * Get the requirements for the provided info
35     *
36     * @since 1.26
37     * @param array $info
38     * @param bool $includeDev
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, $includeDev );
43
44    /**
45     * Returns the extracted autoload info.
46     * The autoload info is returned as an associative array with three keys:
47     * - files: a list of files to load, for use with Autoloader::loadFile()
48     * - classes: a map of class names to files, for use with Autoloader::registerClass()
49     * - namespaces: a map of namespace names to directories, for use
50     *   with Autoloader::registerNamespace()
51     *
52     * @since 1.39
53     *
54     * @param bool $includeDev
55     *
56     * @return array[] The autoload info.
57     */
58    public function getExtractedAutoloadInfo( bool $includeDev = false ): array;
59}