| 1 | <?php |
||
| 7 | class ModuleRepository implements ModuleRepositoryInterface |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var Collection |
||
| 12 | */ |
||
| 13 | protected $modules; |
||
| 14 | |||
| 15 | 40 | public function __construct() |
|
| 19 | |||
| 20 | /** |
||
| 21 | * Registers a dashboard module into the ecosystem |
||
| 22 | * |
||
| 23 | * @param ModuleInterface $module |
||
| 24 | * @return bool |
||
| 25 | */ |
||
| 26 | public function register(ModuleInterface $module) |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Loads all registered dashboard modules |
||
| 33 | * |
||
| 34 | * @return array |
||
| 35 | */ |
||
| 36 | 10 | public function getRegistered() |
|
| 40 | |||
| 41 | /** |
||
| 42 | * Verify whether a module has been registered |
||
| 43 | * |
||
| 44 | * @param ModuleInterface $module |
||
| 45 | * @return mixed |
||
| 46 | */ |
||
| 47 | public function isRegistered(ModuleInterface $module) |
||
| 51 | } |