1 | <?php |
||
9 | final class ShibbolethMetadataScope implements Serializable |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $scope; |
||
15 | |||
16 | /** |
||
17 | * @var bool |
||
18 | */ |
||
19 | private $isRegexp; |
||
20 | |||
21 | /** |
||
22 | * @param string $literal |
||
23 | * @return ShibbolethMetadataScope |
||
24 | */ |
||
25 | public static function literal($literal) |
||
31 | |||
32 | /** |
||
33 | * @param string $regexp |
||
34 | * @return ShibbolethMetadataScope |
||
35 | */ |
||
36 | public static function regexp($regexp) |
||
42 | |||
43 | /** |
||
44 | * @param string $scope the scope as defined |
||
45 | * @param bool $isRegexp whether or not the scope is a regular expression as identified by the regexp attribute |
||
46 | */ |
||
47 | public function __construct($scope, $isRegexp = false) |
||
59 | |||
60 | /** |
||
61 | * @param string $string |
||
62 | * @return bool |
||
63 | */ |
||
64 | public function allows($string) |
||
75 | |||
76 | /** |
||
77 | * @param ShibbolethMetadataScope $other |
||
78 | * @return bool |
||
79 | */ |
||
80 | public function equals(ShibbolethMetadataScope $other) |
||
84 | |||
85 | public static function deserialize($data) |
||
92 | |||
93 | public function serialize() |
||
100 | |||
101 | public function __toString() |
||
109 | } |
||
110 |