1 | <?php |
||
8 | final class EntityType implements Serializable |
||
9 | { |
||
10 | const TYPE_SP = 'saml20-sp'; |
||
11 | const TYPE_IDP = 'saml20-idp'; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $type; |
||
17 | |||
18 | /** |
||
19 | * @param string $type |
||
20 | */ |
||
21 | public function __construct($type) |
||
31 | |||
32 | /** |
||
33 | * Creates a new ServiceProvider Type |
||
34 | * @return EntityType |
||
35 | * |
||
36 | * @SuppressWarnings(PHPMD.CamelCaseMethodName) |
||
37 | * @SuppressWarnings(PHPMD.ShortMethodName) |
||
38 | */ |
||
39 | public static function SP() |
||
43 | |||
44 | // @codingStandardsIgnoreStart |
||
45 | /** |
||
46 | * Creates a new IdentityProvider Type |
||
47 | * @return EntityType |
||
48 | * |
||
49 | * @SuppressWarnings(PHPMD.CamelCaseMethodName) |
||
50 | */ |
||
51 | public static function IdP() |
||
55 | // @codingStandardsIgnoreEnd |
||
56 | |||
57 | /** |
||
58 | * @return bool |
||
59 | */ |
||
60 | public function isServiceProvider() |
||
64 | |||
65 | /** |
||
66 | * @return bool |
||
67 | */ |
||
68 | public function isIdentityProvider() |
||
72 | |||
73 | /** |
||
74 | * @param EntityType $other |
||
75 | * @return bool |
||
76 | */ |
||
77 | public function equals(EntityType $other) |
||
81 | |||
82 | public static function deserialize($data) |
||
86 | |||
87 | public function serialize() |
||
91 | |||
92 | public function __toString() |
||
96 | } |
||
97 |