1 | <?php |
||
24 | class PluginDependencySolver { |
||
25 | |||
26 | /** @var PluginManager */ |
||
27 | private $plugin_manager; |
||
28 | |||
29 | public function __construct(PluginManager $plugin_manager) { |
||
32 | |||
33 | /** |
||
34 | * Get plugin names that are still installed and which depends on the given plugin |
||
35 | * |
||
36 | * @return array of strings |
||
37 | */ |
||
38 | public function getInstalledDependencies(Plugin $plugin) { |
||
41 | |||
42 | /** |
||
43 | * Get plugin names that are still available and which depends on the given plugin |
||
44 | * |
||
45 | * @return array of strings |
||
46 | */ |
||
47 | public function getAvailableDependencies(Plugin $plugin) { |
||
50 | |||
51 | /** |
||
52 | * Get plugin names that should already be installed for the given plugin name |
||
53 | * |
||
54 | * @return array of strings |
||
55 | */ |
||
56 | public function getUnmetInstalledDependencies($plugin_name) { |
||
60 | |||
61 | /** |
||
62 | * Get plugin names that should already be available for the given plugin name |
||
63 | * |
||
64 | * @return array of strings |
||
65 | */ |
||
66 | public function getUnmetAvailableDependencies(Plugin $plugin) { |
||
69 | |||
70 | private function getUnmetMissingDependencies(Plugin $plugin, $method) { |
||
80 | |||
81 | private function getMissingDependencies(Plugin $plugin, array $plugins_collection) { |
||
90 | } |
||
91 | ?> |
||
92 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: