| 1 | <?php |
||
| 8 | trait HasPermissionTrait |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Checks whether the role or user has the permission with the name or array of permission names |
||
| 12 | * @param string|array $name |
||
| 13 | * @return bool |
||
| 14 | */ |
||
| 15 | public function hasPermission($name) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Checks whether the role or user has any of permissions in the specified permissions |
||
| 41 | * @param array $names |
||
| 42 | * @return bool |
||
| 43 | */ |
||
| 44 | public function hasAnyPermission(array $names) |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Gets all permissions |
||
| 57 | * @return Permission[] |
||
| 58 | */ |
||
| 59 | abstract public function getAllPermissions(); |
||
| 60 | } |