Skip to content

Commit

Permalink
Update CapabilityInterface.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayIterator authored Jul 18, 2024
1 parent c8c833b commit f304610
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/Auth/Roles/Interfaces/CapabilityInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,45 @@

interface CapabilityInterface
{
/**
* Check if the capability has a role
*
* @param RoleInterface|string $role
* @return bool
*/
public function has(RoleInterface|string $role) : bool;

/**
* Add a role to the capability
* @param RoleInterface|string $role
*/
public function add(RoleInterface|string $role);

/**
* Get role identity
*
* @return string
*/
public function getIdentity(): string;

/**
* Get capability name
*
* @return string
*/
public function getName(): string;

/**
* Get capability description
*
* @return string|null
*/
public function getDescription(): ?string;

/**
* Get list of roles
*
* @return iterable<string, RoleInterface>
*/
public function getRoles() : iterable;
}

0 comments on commit f304610

Please sign in to comment.