forked from phpbb/phpbb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanager_interface.php
More file actions
110 lines (98 loc) · 2.81 KB
/
manager_interface.php
File metadata and controls
110 lines (98 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\composer;
use Composer\IO\IOInterface;
use phpbb\composer\exception\runtime_exception;
/**
* Class to manage packages through composer.
*/
interface manager_interface
{
/**
* Installs (if necessary) a set of packages
*
* @param array $packages Packages to install.
* Each entry may be a name or an array associating a version constraint to a name
* @param IOInterface|null $io IO object used for the output
*
* @throws runtime_exception
*/
public function install(array $packages, IOInterface $io = null);
/**
* Updates or installs a set of packages
*
* @param array $packages Packages to update.
* Each entry may be a name or an array associating a version constraint to a name
* @param IOInterface|null $io IO object used for the output
*
* @throws runtime_exception
*/
public function update(array $packages, IOInterface $io = null);
/**
* Removes a set of packages
*
* @param array $packages Packages to remove.
* Each entry may be a name or an array associating a version constraint to a name
* @param IOInterface|null $io IO object used for the output
*
* @throws runtime_exception
*/
public function remove(array $packages, IOInterface $io = null);
/**
* Tells whether or not a package is managed by Composer.
*
* @param string $package Package name
*
* @return bool
*/
public function is_managed($package);
/**
* Returns the list of managed packages for the current type
*
* @return array The managed packages associated to their version.
*/
public function get_managed_packages();
/**
* Returns the list of managed packages for all phpBB types
*
* @return array The managed packages associated to their version.
*/
public function get_all_managed_packages();
/**
* Returns the list of available packages
*
* @return array The name of the available packages, associated to their definition. Ordered by name.
*/
public function get_available_packages();
/**
* Reset the cache
*/
public function reset_cache();
/**
* Start managing a manually installed package
*
* Remove a package installed manually and reinstall it using composer.
*
* @param string $package Package to manage
* @param IOInterface $io IO object used for the output
*
* @throws runtime_exception
*/
public function start_managing($package, $io);
/**
* Checks the requirements of the manager and returns true if it can be used.
*
* @return bool
*/
public function check_requirements();
}