Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nathanejohnson/sip2wrapper
php sip2 library
https://github.com/nathanejohnson/sip2wrapper
Last synced: 26 days ago
JSON representation
php sip2 library
- Host: GitHub
- URL: https://github.com/nathanejohnson/sip2wrapper
- Owner: nathanejohnson
- License: gpl-3.0
- Created: 2014-02-05T20:32:46.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-03-09T17:20:54.000Z (over 4 years ago)
- Last Synced: 2024-03-28T00:37:28.404Z (8 months ago)
- Language: PHP
- Size: 371 KB
- Stars: 7
- Watchers: 6
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a wrapper class for the sip2.class.php from [google code](https://code.google.com/p/php-sip2/). So far only wrapping the calls
authenticate a patron and extract various bits of patron information from the patron status
and patron information calls.Documentation can be generated by running [phpDocumentor](http://www.phpdoc.org/) with included phpdoc.dist.xml file.
Usage:
```php
require_once 'Sip2Wrapper.php';$sip2 = new Sip2Wrapper(
array(
'hostname' => $hostname,
'port' => 6001,
'withCrc' => false,
'location' => $location,
'institutionId' => $institutionId
)
);$sip2->login($user, $pass);
if ($sip2->startPatronSession($patron, $patronpwd)) {
var_dump($sip2->patronScreenMessages);
}
```All of the methods that are prefixed by the word "get" can also be used as properties,
and all protected properties have appropriately named getter methods so that you can effectively
have read-only access via the magic getter. For instance,while you can't do this:
$sip2 = $mySip2Wrapper->_sip2;
You can do this:
$sip2 = $mySip2Wrapper->sip2;
The other get methods can be called in this way as well and can be used as virtual properties.
For instance, this works even though there is no property named patronStatus:
$patronStatus = $sip2->patronStatus;
Behind the scenes it calls the getPatronStatus() method and returns the value.
To Do:
Finish implementing the methods relating to checking out books etc.