Keybase proof
I hereby claim:
- I am Crell on github.
- I am crell (https://keybase.io/crell) on keybase.
- I have a public key whose fingerprint is F230 376C 8EAE 38F8 B02B 879A 4FC0 2402 604A 0773
To claim this, I am signing this object:
/* | |
* This build file was generated by the Gradle 'init' task. | |
* | |
* This generated file contains a sample Java project to get you started. | |
* For more details take a look at the Java Quickstart chapter in the Gradle | |
* user guide available at https://docs.gradle.org/3.3/userguide/tutorial_java_projects.html | |
*/ | |
// Apply the java plugin to add support for Java | |
apply plugin: 'java' |
web@5x37plrvz5sze-work-adqt5vy--app:~$ java -jar build/libs/SpringBlog-0.1.jar -Dport.http=8888 -Ddatabase.name=main -Ddatabase.user=user -Ddatabase.pass= -Ddatabase.host=database.internal -Dredis.host=rediscache.internal -Dredis.port=6379 --spring.config.location=application-production.yml -verbose | |
SLF4J: Class path contains multiple SLF4J bindings. | |
SLF4J: Found binding in [jar:file:/app/build/libs/SpringBlog-0.1.jar!/lib/logback-classic-1.1.3.jar!/org/slf4j/impl/StaticLoggerBinder.class] | |
SLF4J: Found binding in [jar:file:/app/build/libs/SpringBlog-0.1.jar!/lib/slf4j-log4j12-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class] | |
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. | |
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] | |
. ____ _ __ _ _ | |
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ | |
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ |
<?php | |
use Aerys\Host; | |
use Aerys\Router; | |
use Kelunik\Demo\Chat; | |
use function Aerys\root; | |
use function Aerys\websocket; | |
// route /ws to the websocket endpoint | |
// you can add more routes to this router |
function the_real_all(ServerRequestInterface $req, callable $next) { | |
$action = $req->getAttribute('_action'); | |
$args = $req->getAttribute('_arguments); | |
$result = $action(...$args); | |
if (! $result instanceof ResponseInterface) { | |
$responder = resolve_responder(get_class($result)); | |
$result = $responder($result); | |
} |
I hereby claim:
To claim this, I am signing this object:
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); |
<?php | |
namespace Crell\IcicleTest; | |
use Icicle\Http\Message\RequestInterface; | |
use Icicle\Http\Message\Response; | |
class Router |
<?php | |
class AccessedPolicy implements PolicyInterface { | |
public function __construct($access_count) { /*...*/ } | |
} |
<?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(); | |
} |