| 1 | <?php |
||
| 13 | class RuleResult |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var Rule |
||
| 17 | */ |
||
| 18 | protected $rule; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | protected $needRoleName; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | protected $needResourceName; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var int |
||
| 32 | */ |
||
| 33 | protected $id; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @var mixed |
||
| 37 | */ |
||
| 38 | protected $action; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @var bool |
||
| 42 | */ |
||
| 43 | protected $isInit = false; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param Rule $rule |
||
| 47 | * @param string|null $needRoleName |
||
| 48 | * @param string|null $needResourceName |
||
| 49 | 31 | */ |
|
| 50 | public function __construct(Rule $rule, $needRoleName, $needResourceName) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return string |
||
| 62 | 2 | */ |
|
| 63 | public function getNeedResourceName(): string |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return string |
||
| 70 | 2 | */ |
|
| 71 | public function getNeedRoleName(): string |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return Rule |
||
| 78 | 27 | */ |
|
| 79 | public function getRule(): Rule |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @return mixed |
||
| 86 | 27 | */ |
|
| 87 | public function getAction() |
||
| 96 | |||
| 97 | /** |
||
| 98 | * @return int |
||
| 99 | 1 | */ |
|
| 100 | public function getId(): int |
||
| 104 | |||
| 105 | /** |
||
| 106 | * @return ResourceAggregateInterface |
||
| 107 | 2 | */ |
|
| 108 | public function getResourceAggregate(): ResourceAggregateInterface |
||
| 112 | |||
| 113 | /** |
||
| 114 | * @return RoleAggregateInterface |
||
| 115 | 2 | */ |
|
| 116 | public function getRoleAggregate(): RoleAggregateInterface |
||
| 120 | } |
||
| 121 |