@@ 114-124 (lines=11) @@ | ||
111 | /** |
|
112 | * @return Session |
|
113 | */ |
|
114 | public function session(): Session |
|
115 | { |
|
116 | return Bind::once(__METHOD__, function () { |
|
117 | ||
118 | $content = $this->config()->get('content'); |
|
119 | $slice = $content->getSlice('session'); |
|
120 | ||
121 | return new Session($slice->getData('password')); |
|
122 | ||
123 | }); |
|
124 | } |
|
125 | ||
126 | /** |
|
127 | * @return Cookies |
|
@@ 129-139 (lines=11) @@ | ||
126 | /** |
|
127 | * @return Cookies |
|
128 | */ |
|
129 | public function cookies(): Cookies |
|
130 | { |
|
131 | return Bind::once(__METHOD__, function () { |
|
132 | ||
133 | $content = $this->config()->get('content'); |
|
134 | $slice = $content->getSlice('cookies'); |
|
135 | ||
136 | return new Cookies($slice->getData('password')); |
|
137 | ||
138 | }); |
|
139 | } |
|
140 | ||
141 | /** |
|
142 | * @return Factory |
|
@@ 164-175 (lines=12) @@ | ||
161 | /** |
|
162 | * @return Password |
|
163 | */ |
|
164 | public function password(): Password |
|
165 | { |
|
166 | return Bind::once(__METHOD__, function () { |
|
167 | ||
168 | $slice = $this->config()->get('password'); |
|
169 | ||
170 | return new Password( |
|
171 | $slice->getData('algo', PASSWORD_DEFAULT), |
|
172 | $slice->getData('options') |
|
173 | ); |
|
174 | }); |
|
175 | } |
|
176 | ||
177 | } |
|
178 |