File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ final class Factory
28
28
*/
29
29
private ?string $ organization = null ;
30
30
31
+ /**
32
+ * The project for the requests.
33
+ */
34
+ private ?string $ project = null ;
35
+
31
36
/**
32
37
* The HTTP client for the requests.
33
38
*/
@@ -74,6 +79,16 @@ public function withOrganization(?string $organization): self
74
79
return $ this ;
75
80
}
76
81
82
+ /**
83
+ * Sets the project for the requests.
84
+ */
85
+ public function withProject (?string $ project ): self
86
+ {
87
+ $ this ->project = project;
88
+
89
+ return $ this ;
90
+ }
91
+
77
92
/**
78
93
* Sets the HTTP client for the requests.
79
94
* If no client is provided the factory will try to find one using PSR-18 HTTP Client Discovery.
@@ -141,6 +156,10 @@ public function make(): Client
141
156
$ headers = $ headers ->withOrganization ($ this ->organization );
142
157
}
143
158
159
+ if ($ this ->project !== null ) {
160
+ $ headers = $ headers ->withProject ($ this ->project );
161
+ }
162
+
144
163
foreach ($ this ->headers as $ name => $ value ) {
145
164
$ headers = $ headers ->withCustomHeader ($ name , $ value );
146
165
}
You can’t perform that action at this time.
0 commit comments