dnumber-client-php
A PHP client for interacting with the DoIT Number API.
Developer Requirements
- PHP >= 5.3
- Phing
Installing with Composer
To include dnumber-client-php
in your project, add the following to your project's composer.json
file:
{
"repositories": [
{
"type": "vcs",
"url": "git@git.doit.wisc.edu/adi-ia/dnumber-client-php.git"
}
]
}
Example Usage
<?php
use edu\wisc\doit\financials\dnumber\DnumberRestClient;
$client = new DnumberRestClient($username, $password);
$response = $client->retrieveById($id);
if ($response != null) {
$active = $response->isActive();
...
}
Mock Client
A mock client is provided at edu\wisc\doit\financials\dnumber\MockDnumberClient
. By default, the mock client always
returns a response for an active DoIT Number.