1 | <?php |
||
13 | class AuthTokenMetadata extends ModelMetadata |
||
14 | { |
||
15 | /** |
||
16 | * @var boolean $enabled |
||
17 | */ |
||
18 | private $enabled; |
||
19 | |||
20 | /** |
||
21 | * @var string $cookieName |
||
22 | */ |
||
23 | private $cookieName; |
||
24 | |||
25 | /** |
||
26 | * @var string $cookieDuration |
||
27 | */ |
||
28 | private $cookieDuration; |
||
29 | |||
30 | /** |
||
31 | * @var boolean $httpsOnly |
||
32 | */ |
||
33 | private $httpsOnly; |
||
34 | |||
35 | /** |
||
36 | * |
||
37 | * @return array |
||
38 | * @see \Charcoal\Config\ConfigInterface::defaults() |
||
39 | */ |
||
40 | public function defaults() |
||
52 | |||
53 | /** |
||
54 | * @param boolean $enabled The enabled flag. |
||
55 | * @return self |
||
56 | */ |
||
57 | public function setEnabled($enabled) |
||
62 | |||
63 | /** |
||
64 | * @return boolean |
||
65 | */ |
||
66 | public function getEnabled() |
||
67 | { |
||
68 | return $this->enabled; |
||
69 | } |
||
70 | |||
71 | /** |
||
72 | * @param string $name The cookie name. |
||
73 | * @throws InvalidArgumentException If the cookie name is not a string. |
||
74 | * @return self |
||
75 | */ |
||
76 | public function setCookieName($name) |
||
86 | |||
87 | /** |
||
88 | * @return string |
||
89 | */ |
||
90 | public function getCookieName() |
||
91 | { |
||
92 | return $this->cookieName; |
||
93 | } |
||
94 | |||
95 | /** |
||
96 | * @param string $duration The cookie duration, or duration. Ex: "15 days". |
||
97 | * @throws InvalidArgumentException If the cookie name is not a string. |
||
98 | * @return self |
||
99 | */ |
||
100 | public function setCookieDuration($duration) |
||
110 | |||
111 | /** |
||
112 | * @return string |
||
113 | */ |
||
114 | public function getCookieDuration() |
||
115 | { |
||
116 | return $this->cookieDuration; |
||
117 | } |
||
118 | |||
119 | /** |
||
120 | * @param boolean $httpsOnly The "https only" flag. |
||
121 | * @return self |
||
122 | */ |
||
123 | public function setHttpsOnly($httpsOnly) |
||
128 | |||
129 | /** |
||
130 | * @return boolean |
||
131 | */ |
||
132 | public function getHttpsOnly() |
||
136 | } |
||
137 |