PHP code example of woohoolabs / yin-middleware

1. Go to this page and download the library: Download woohoolabs/yin-middleware 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/ */

    

woohoolabs / yin-middleware example snippets


$harmony->addMiddleware(new YinCompatibilityMiddleware());

$harmony->addMiddleware(new JsonApiRequestValidatorMiddleware());

$harmony->addMiddleware(new JsonApiResponseValidatorMiddleware());

$harmony->addMiddleware(new JsonApiDispatcherMiddleware());

public function myAction(JsonApi $jsonApi): ResponseInterface;

public function myAction(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface;