This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toJsonResponse(ApiProblem $problem, ResponseInterface $response) | |
{ | |
$body = $response->getBody(); | |
$body->rewind(); | |
$body->write($problem->asJson($this->pretty)); | |
return $this->toResponse($problem, $response) | |
->withHeader('Content-Type', 'application/problem+json') | |
->withBody($body); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Crell\IcicleTest; | |
use Icicle\Http\Message\RequestInterface; | |
use Icicle\Http\Message\Response; | |
class Router |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class AccessedPolicy implements PolicyInterface { | |
public function __construct($access_count) { /*...*/ } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class BigPipeResponse extends StreamedResponse { | |
public function __construct(Response $response) { | |
$this->mainResponse = $response; | |
$this->setStatusCode($response->statusCode()); | |
$this->headers->set($response->headers->all()); | |
$this->mainBody = $response->getContent(); | |
} |
NewerOlder