PHP code example of mvo / me-like

1. Go to this page and download the library: Download mvo/me-like 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/ */

    

mvo / me-like example snippets

       
    class MyEndpoint implements EndpointValidatorInterface
    {
        public function handle(string $domain, ?int $id): ?bool
        {
            return 'my-endpoint' === $domain ? 
                EndpointValidatorInterface::VALID : 
                EndpointValidatorInterface::UNKOWN;
        }
   
       public function addContext(string $domain, ?int $id): ?array
       {
            return null;
       }
    }