Skip to content

Commit

Permalink
#2 in work
Browse files Browse the repository at this point in the history
  • Loading branch information
v-dem committed Jul 21, 2022
1 parent b4eb4f5 commit 96af570
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ protected function view($__page, array $__data = array(), $__responseCode = 200)

ob_end_clean();

$this->app->stream->write($__body);

return $this->app->response
->withBody(new Stream($__body))
->withBody($this->app->stream)
->withStatus($__responseCode);
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/MiddlewareHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace queasy\framework;

use Closure;

use Psr\Http\Message\ServerRequestInterface;

use Psr\Log\LoggerAwareInterface;
Expand All @@ -25,7 +27,7 @@ public function __construct($config, App $app)
$this->logger = new NullLogger();
}

public function handle(ServerRequestInterface $request, $controller)
public function handle(ServerRequestInterface $request, Closure $controllerClosure)
{

}
Expand Down

0 comments on commit 96af570

Please sign in to comment.