1 | <?php |
||
27 | class AssemblyResult |
||
28 | { |
||
29 | /** |
||
30 | * These characters are allowed within a path and should not be encoded. |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | protected static $allowedPathChars = [ |
||
35 | '%2F' => '/', |
||
36 | '%40' => '@', |
||
37 | '%3A' => ':', |
||
38 | '%3B' => ';', |
||
39 | '%2C' => ',', |
||
40 | '%3D' => '=', |
||
41 | '%2B' => '+', |
||
42 | '%21' => '!', |
||
43 | '%2A' => '*', |
||
44 | '%7C' => '|', |
||
45 | ]; |
||
46 | |||
47 | /** |
||
48 | * @var null|string |
||
49 | */ |
||
50 | public $scheme; |
||
51 | |||
52 | /** |
||
53 | * @var null|string |
||
54 | */ |
||
55 | public $host; |
||
56 | |||
57 | /** |
||
58 | * @var null|int |
||
59 | */ |
||
60 | public $port; |
||
61 | |||
62 | /** |
||
63 | * @var null|string |
||
64 | */ |
||
65 | public $path; |
||
66 | |||
67 | /** |
||
68 | * @var null|array |
||
69 | */ |
||
70 | public $query; |
||
71 | |||
72 | /** |
||
73 | * @var null|string |
||
74 | */ |
||
75 | public $fragment; |
||
76 | |||
77 | /** |
||
78 | * Converts the assembly result to a string. |
||
79 | * |
||
80 | * If $forceCanonical is set to false, a scheme or host is only prepended |
||
81 | * to the result if they differ from the references. In case $forceCanonical |
||
82 | * is set to true, either the set scheme and host will be used, or if not |
||
83 | * set, the reference values. |
||
84 | * |
||
85 | * @param string $referenceScheme |
||
86 | * @param string $referenceHost |
||
87 | * @param int $referencePort |
||
88 | * @param bool $forceCanonical |
||
89 | * @return string |
||
90 | */ |
||
91 | public function generateUri($referenceScheme, $referenceHost, $referencePort, $forceCanonical) |
||
130 | } |
||
131 |