mirror of
https://github.com/pcsc-for-php/pcsc.git
synced 2026-08-08 21:09:26 +02:00
Fixed and added some more PHP test code; Not stable
This commit is contained in:
parent
5aad57fa26
commit
2562478bd4
3 changed files with 102 additions and 13 deletions
|
|
@ -14,39 +14,39 @@ class PCSC {
|
|||
function __construct() {
|
||||
$this->context = scard_establish_context();
|
||||
}
|
||||
|
||||
function __destruct() {
|
||||
|
||||
/*function __destruct() {
|
||||
$this->context = scard_release_context($this->context);
|
||||
}
|
||||
}*/
|
||||
|
||||
function connect($reader) {
|
||||
return $this->connection = scard_connect($this->context, $reader);
|
||||
}
|
||||
|
||||
|
||||
/*function reconnect() {
|
||||
return $this->connection = scard_reconnect($this->connection);
|
||||
}*/
|
||||
|
||||
|
||||
function disconnect() {
|
||||
return scard_disconnect($this->connection);
|
||||
}
|
||||
|
||||
|
||||
function listreaders() {
|
||||
return $this->readers = scard_list_readers($this->context);
|
||||
}
|
||||
|
||||
|
||||
function transmit($apdu) {
|
||||
return scard_transmit($this->connection, $apdu);
|
||||
}
|
||||
|
||||
|
||||
function isvalidcontext() {
|
||||
return scard_is_valid_context($this->context);
|
||||
}
|
||||
|
||||
|
||||
function releasecontext() {
|
||||
return scard_release_context($this->context);
|
||||
}
|
||||
|
||||
|
||||
function status() {
|
||||
return scard_status($this->connection);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue