PHP code example of methorz / mezzio-hexagonal-skeleton
1. Go to this page and download the library: Download methorz/mezzio-hexagonal-skeleton library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
methorz / mezzio-hexagonal-skeleton example snippets
declare(strict_types=1);
namespace App\Application\Handler;
use Laminas\Diactoros\Response\JsonResponse;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class MyHandler implements RequestHandlerInterface
{
public function handle(ServerRequestInterface $request): ResponseInterface
{
return new JsonResponse(['message' => 'Hello World']);
}
}