1: <?php
2:
3: namespace ProgrammingAreHard\Arbiter\Model;
4:
5: interface PermissionsInterface extends \IteratorAggregate, \Countable
6: {
7: /**
8: * Does the permissions have the permission?
9: *
10: * @param string $permission
11: * @return bool
12: */
13: public function contains($permission);
14:
15: /**
16: * Add the permission.
17: *
18: * @param string $permission
19: * @return $this
20: */
21: public function add($permission);
22:
23: /**
24: * Remove the permission.
25: *
26: * @param string $permission
27: * @return $this
28: */
29: public function remove($permission);
30:
31: /**
32: * Convert to array.
33: *
34: * @return string[]
35: */
36: public function toArray();
37: }