@@ -42,7 +42,7 @@ The Decoration Repo Provides 3 Factories which instantiate the Decorators. They
42
42
<?php
43
43
44
44
use Nyholm\Psr7\Factory\Psr17Factory;
45
- use Slim\Http\Decorators\ Factory\DecoratedResponseFactory;
45
+ use Slim\Http\Factory\DecoratedResponseFactory;
46
46
47
47
$nyholmFactory = new Psr17Factory();
48
48
@@ -55,8 +55,8 @@ $nyholmFactory = new Psr17Factory();
55
55
$decoratedResponseFactory = new DecoratedResponseFactory($nyholmFactory, $nyholmFactory);
56
56
57
57
/**
58
- * @var \Slim\Http\Decorators\DecoratedResponse $response
59
- * The returned variable is a DecoratedResponse which has methods like withJson()
58
+ * @var \Slim\Http\Decorators\ResponseDecorator $response
59
+ * The returned variable is a ResponseDecorator which has methods like withJson()
60
60
*/
61
61
$response = $decoratedResponseFactory->createResponse(200, 'OK');
62
62
$response = $response->withJson(['data' => [1, 2, 3]]);
@@ -70,7 +70,7 @@ $response = $response->withJson(['data' => [1, 2, 3]]);
70
70
71
71
use Zend\Diactoros\ResponseFactory;
72
72
use Zend\Diactoros\StreamFactory;
73
- use Slim\Http\Decorators\ Factory\DecoratedResponseFactory;
73
+ use Slim\Http\Factory\DecoratedResponseFactory;
74
74
75
75
$responseFactory = new ResponseFactory();
76
76
$streamFactory = new StreamFactory();
@@ -83,8 +83,8 @@ $streamFactory = new StreamFactory();
83
83
$decoratedResponseFactory = new DecoratedResponseFactory($responseFactory, $streamFactory);
84
84
85
85
/**
86
- * @var \Slim\Http\Decorators\DecoratedResponse $response
87
- * The returned variable is a DecoratedResponse which has methods like withJson()
86
+ * @var \Slim\Http\Decorators\ResponseDecorator $response
87
+ * The returned variable is a ResponseDecorator which has methods like withJson()
88
88
*/
89
89
$response = $decoratedResponseFactory->createResponse(200, 'OK');
90
90
$response = $response->withJson(['data' => [1, 2, 3]]);
0 commit comments