Created
August 14, 2016 12:23
-
-
Save GeeH/4fb87425fbab9b75957ccb755572ad59 to your computer and use it in GitHub Desktop.
This file contains 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 App\Action; | |
use Psr\Http\Message\ResponseInterface; | |
use Psr\Http\Message\ServerRequestInterface; | |
use Zend\Diactoros\Response\JsonResponse; | |
class PingAction | |
{ | |
const ROUTE_NAME = 'api.ping'; | |
const ROUTE_PATH = '/api/ping'; | |
const ROUTE_METHODS = ['GET']; | |
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) | |
{ | |
return new JsonResponse(['ack' => time()]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment