Skip to content

Commit bfc4744

Browse files
committed
More planning on how to better handle the request parent object
1 parent 625ff8c commit bfc4744

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

sample/src/Routes/Path/Subpath/GetPathSubpath.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ class GetResponse extends AbstractJsonResponse
2929
{
3030
public const ResponseCode = 200;
3131

32-
// TODO: This is kinda weird that we have the constructor version of properties for responses
33-
// But that does not work for requests. We need to work that out.
3432
public function __construct(
3533
public int $pathVar,
3634
public ?int $someVar = null,

src/Model/Request/AbstractRequest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ abstract class AbstractRequest
99
{
1010
public readonly Request $request;
1111

12+
// TODO: switch out this as a constructor to instead have this logic in the request parser.
13+
// The router will go into a private property that will get set in the router and will be
14+
// accessible via a get method.
1215
public function __construct(
1316
Request $request,
1417
) {

0 commit comments

Comments
 (0)