Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
TemporaryOptions | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
2 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\Core\Store; |
6 | |
7 | use PeServer\Core\Text; |
8 | use PeServer\Core\Store\CookieOptions; |
9 | use PeServer\Core\Throws\ArgumentException; |
10 | |
11 | /** |
12 | * 一時データ設定。 |
13 | */ |
14 | readonly class TemporaryOptions |
15 | { |
16 | #region define |
17 | |
18 | /** 一時データID保持Cookie名。 */ |
19 | public const DEFAULT_NAME = 'PHPTEMPID'; //cspell:disable-line |
20 | |
21 | #endregion |
22 | |
23 | public function __construct( |
24 | public string $name, |
25 | public string $savePath, |
26 | public CookieOptions $cookie |
27 | ) { |
28 | if (Text::isNullOrWhiteSpace($name)) { |
29 | throw new ArgumentException('$name'); |
30 | } |
31 | } |
32 | } |