Download the PHP package danmichaelo/ncip without Composer
On this page you can find all versions of the php package danmichaelo/ncip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download danmichaelo/ncip
More information about danmichaelo/ncip
Files in danmichaelo/ncip
Package ncip
Short Description Basic NCIP library
License MIT
Homepage http://github.com/scriptotek/php-ncip
Informations about the package ncip
Basic NCIP php library and Laravel package
php-ncip is a php package for parsing and formatting NCIP request and response messages. Development has been guided by a desire for a simple API rather than a complete one. Only a small subset of the NCIP specification is currently covered, but suggestions for additions are welcome.
Installation:
Composer
Add the package to the require
list of your composer.json
file.
and run composer install
to get the latest version of the package.
Additional steps for Laravel 4
The package comes with a Laravel 4 service provider that you can install if you like. It comes with a config file, so you can set settings there instead of passing them to the constructor.
To register the service provider, add 'Scriptotek\NcipServiceProvider',
to the list of providers
in app/config/app.php
. Then run php artisan config:publish danmichaelo/ncip
in your terminal to create the config file app/config/packages/danmichael/ncip/config.php
.
Usage:
Construction
To construct a client, you need to specify the url to the NCIP srvice, a freely choosen user agent string for your client, and the agency id. The agency id identifies your institution, as specified in the NCIP protocol.
To construct a server:
If you have registered the Laravel 4 service provider, the classes can be constructed through the applications container instead:
The settings are now pulled from app/config/packages/danmichael/ncip/config.php
instead, and the NcipConnector
is injected into the NcipClient
automatically.
Client example:
Server example:
Events:
The client emits events on each request to the server. This can be useful to implement logging.
The events are request.item
, request.user
, request.checkout
, request.checkin
and request.renew
.
For debugging, events message.send
and message.recv
are emitted on each message sent to and received
from the server. The message xml body is given as the first argument.
All versions of ncip with dependencies
danmichaelo/quitesimplexmlelement Version ~0.2.0
illuminate/support Version ~4.1.0
nesbot/carbon Version ~1.8.0
evenement/evenement Version 1.0.*