We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08fe431 commit 11c3ffcCopy full SHA for 11c3ffc
src/ResponseFactory.php
@@ -43,13 +43,16 @@ public static function create(RequestInterface $request):Response {
43
* to be registered to match the request's "accept" header. This allows the web client to
44
* request a web page in HTML format, over a web API in JSON format, for example.
45
*/
46
- public static function registerResponseClass(string $class, string...$accept):void {
+ public static function registerResponseClass(
47
+ string $responseClassName,
48
+ string...$accept
49
+ ):void {
50
if(empty($accept)) {
51
$accept = [self::DEFAULT_ACCEPT];
52
}
53
54
foreach($accept as $a) {
- static::$responseClassLookup [$a] = $class;
55
+ static::$responseClassLookup [$a] = $responseClassName;
56
57
58
0 commit comments