-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathModuleResolverInterface.php
More file actions
64 lines (54 loc) · 1.73 KB
/
ModuleResolverInterface.php
File metadata and controls
64 lines (54 loc) · 1.73 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
<?php
declare(strict_types=1);
namespace PanicDevs\Modulite\Contracts;
use Illuminate\Support\Collection;
/**
* Interface for resolving enabled modules from different module management systems.
*
* This interface abstracts the differences between various Laravel module
* management packages (nwidart/laravel-modules, panicdevs/modules, etc.)
* allowing Modulite to work with any module system.
*
* @package PanicDevs\Modulite\Contracts
*/
interface ModuleResolverInterface
{
/**
* Get collection of enabled module names.
*
* @return Collection<int, string> Collection of module names
*/
public function getEnabledModules(): Collection;
/**
* Check if a specific module is enabled.
*
* @param string $moduleName Module name to check
* @return bool True if module is enabled, false otherwise
*/
public function isModuleEnabled(string $moduleName): bool;
/**
* Get all available modules (enabled and disabled).
*
* @return Collection<int, string> Collection of all module names
*/
public function getAllModules(): Collection;
/**
* Get the module system name/type.
*
* @return string Module system identifier (e.g., 'nwidart', 'panicdevs')
*/
public function getSystemType(): string;
/**
* Check if the module system is available and properly configured.
*
* @return bool True if system is available, false otherwise
*/
public function isAvailable(): bool;
/**
* Determine whether panels should be registered
* before Filament initialization.
*
* @return bool True if panels must be registered before Filament
*/
public function shouldRegisterPanelsBeforeFilament(): bool;
}