czechphp/invalid-document

Invalidity check of documents in the database of Ministry of the Interior of the Czech Republic

v1.1.0 2023-11-03 19:06 UTC

This package is auto-updated.

Last update: 2024-11-03 21:22:09 UTC


README

Czech: Kontrola neplatnosti dokladů u Ministerstva vnitra České republiky. Oficiální informace (cs)

Build Status

Invalidity check of documents in the database of Ministry of the Interior of the Czech Republic. Official information (en)

It's possible to check following document numbers:

  • Identification card (Občanský průkaz)
  • Centrally issued passport (Centrálně vydávaný cestovní pas)
  • Regionally issued passport (Cestovní pas vydaný okresním úřadem)
  • Gun license (Zbrojní průkaz)

Installation

Install the latest version with

$ composer require czechphp/invalid-document

Choose and install PSR-18 HTTP Client implementation and PSR-17 HTTP Factory implementation.

Basic usage

<?php

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
}