Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** @license For full copyright and license information, please see the LICENSE.md file. */ |
| 6 | |
| 7 | namespace App\Core\Profile\Domain\Repository; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | use App\Core\Profile\Domain\Model\Profile; |
| 12 | |
| 13 | /** |
| 14 | * Profile Registry Interface. |
| 15 | * |
| 16 | * Contract for discovering, validating, and retrieving application installation profiles. |
| 17 | * |
| 18 | * @package App\Core\Profile\Domain\Repository |
| 19 | */ |
| 20 | interface ProfileRegistryInterface |
| 21 | { |
| 22 | /** |
| 23 | * Retrieves a profile by its unique machine name. |
| 24 | * |
| 25 | * @param string $name Profile machine name. |
| 26 | * @return Profile|null Profile instance or null if not found. |
| 27 | */ |
| 28 | public function get(string $name): ?Profile; |
| 29 | |
| 30 | /** |
| 31 | * Checks if a profile exists by name. |
| 32 | * |
| 33 | * @param string $name Profile machine name. |
| 34 | * @return bool True if profile exists. |
| 35 | */ |
| 36 | public function has(string $name): bool; |
| 37 | |
| 38 | /** |
| 39 | * Lists all registered profiles in the application. |
| 40 | * |
| 41 | * @return array<string, Profile> Map of profile name to Profile model. |
| 42 | */ |
| 43 | public function all(): array; |
| 44 | } |