mikk150/pcsc

Library to communicate with PCSC smart-card readers

Maintainers

Details

github.com/mikk150/pcsc

Source

Issues

Installs: 14

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 1

pkg:composer/mikk150/pcsc

dev-master 2016-02-21 15:29 UTC

This package is auto-updated.

Last update: 2020-01-04 17:22:24 UTC


README

$context = new mikk150\pcsc\Context;

/**
 * @var mikk150\pcsc\Reader[]
 */
$readers=$context->getReaders();

foreach ($readers as $reader) {
    $reader->onConnect = function (mikk150\pcsc\Connection $connection) {
        echo 'connected'.PHP_EOL;
    };
    $reader->onDisconnect = function (mikk150\pcsc\Connection $connection) {
        echo 'disconnected'.PHP_EOL;
    };
}

while (true) {
    foreach ($readers as $reader) {
        $reader->getConnection();
        //You can use connection here, or you can just use closures to reader
    }
}