| 1 | <?php |
||
| 10 | class RightsRegistry |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * The list of all supported rights in the application, indexed by right name. |
||
| 14 | * |
||
| 15 | * @var RightInterface[] |
||
| 16 | */ |
||
| 17 | protected $rights; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param RightInterface[] $rights The list of all supported rights in the application. |
||
| 21 | */ |
||
| 22 | public function __construct(array $rights) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Returns a right by name. |
||
| 32 | * |
||
| 33 | * @param string $name |
||
| 34 | * |
||
| 35 | * @return RightInterface |
||
| 36 | * |
||
| 37 | * @throws NotFoundException |
||
| 38 | */ |
||
| 39 | public function get(string $name) : RightInterface |
||
| 47 | } |
||
| 48 |