Total Complexity | 4 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class StringParameter extends Parameter { |
||
10 | |||
11 | protected static $name = 'string'; |
||
12 | |||
13 | public function __construct(string $extra) { |
||
15 | } |
||
16 | |||
17 | public function unpackValue(string $matched) { |
||
18 | return urldecode($matched); |
||
19 | } |
||
20 | |||
21 | public function packValue(string $matched) { |
||
22 | return urlencode($matched); |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * 获取匹配字符串 |
||
27 | * |
||
28 | * @return string |
||
29 | */ |
||
30 | public function getMatch():string { |
||
32 | } |
||
33 | } |