PHP code example of czechphp / invalid-document
1. Go to this page and download the library: Download czechphp/invalid-document 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/ */
czechphp / invalid-document example snippets
use Czechphp\InvalidDocument\InvalidDocument;
$client = null; // anything that implements PSR-18 HTTP Client
$requestFactory = null; // anything that implements PSR-17 HTTP Factory
$invalidDocument = new InvalidDocument($client, $requestFactory);
$message = $invalidDocument->get(InvalidDocument::IDENTIFICATION_CARD, '123456AB');
if (true === $message->isRegistered()) {
// the document is in registry of invalid documents
// for example the document might be replaced with new one and this one was invalidated
}
if (false === $message->isRegistered()) {
// the document is not in the registry of invalid documents
// this does not mean that this document is valid
// Ministry of the Interior of the Czech Republic did not specifically declared this document as invalid
}