PluginProbe
404 Solution / trunk
404 Solution vtrunk
4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.19 4.1.18 4.1.17 4.1.16 4.1.15 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.1.7 4.1.6 4.1.5 4.1.4 4.1.3 trunk 2.30.0 All 109 releases
404-solution / includes / php / objs / UserRequestParts.php

UserRequestParts.php in 404 Solution trunk, at includes/php/objs/UserRequestParts.php

49 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) {
4 exit;
5 }
6
7 /**
8 * Immutable parameter object bundling the parsed pieces of an incoming user
9 * request, passed to {@see ABJ_404_Solution_UserRequest::__construct()}.
10 *
11 * Replaces a 5-positional-parameter constructor (criterion 220 Interface
12 * Size). Fields are read directly by the consumer; this is a plain data
13 * carrier with no behavior.
14 */
15 // allow-no-test-found: pure parameter-object DTO (typed public fields, constructor-only assignment, no behavior); fields consumed by ABJ_404_Solution_UserRequest, exercised in UserRequestTest.
16 class ABJ_404_Solution_UserRequestParts {
17
18 /** @var string */
19 public $requestURI;
20
21 /** @var array<string, int|string> */
22 public $urlParts;
23
24 /** @var string */
25 public $urlWithoutCommentPage;
26
27 /** @var string */
28 public $commentPagePart;
29
30 /** @var string */
31 public $queryString;
32
33 /**
34 * @param string $requestURI
35 * @param array<string, int|string> $urlParts
36 * @param string $urlWithoutCommentPage
37 * @param string $commentPagePart
38 * @param string $queryString
39 */
40 public function __construct(string $requestURI, array $urlParts, string $urlWithoutCommentPage,
41 string $commentPagePart, string $queryString) {
42 $this->requestURI = $requestURI;
43 $this->urlParts = $urlParts;
44 $this->urlWithoutCommentPage = $urlWithoutCommentPage;
45 $this->commentPagePart = $commentPagePart;
46 $this->queryString = $queryString;
47 }
48 }
49