PHP code example of woohoolabs / yin-middlewares

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