https://github.com/dgac/nmb2b-phpclient
PHP Client for NM B2B Services
https://github.com/dgac/nmb2b-phpclient
atc b2b eurocontrol web-services
Last synced: 3 months ago
JSON representation
PHP Client for NM B2B Services
- Host: GitHub
- URL: https://github.com/dgac/nmb2b-phpclient
- Owner: DGAC
- License: gpl-3.0
- Created: 2018-04-15T06:32:29.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-08-29T09:19:16.000Z (almost 2 years ago)
- Last Synced: 2025-02-26T01:36:37.233Z (4 months ago)
- Topics: atc, b2b, eurocontrol, web-services
- Language: PHP
- Size: 113 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Client for NM B2B Services #
[](https://gitlab.asap.dsna.fr/asap/nmb2b-phpclient/commits/master) [](https://gitlab.asap.dsna.fr/asap/nmb2b-phpclient/commits/master)
## NM B2B Web Services
http://www.eurocontrol.int/service/network-manager-business-business-b2b-web-services
Supported versions : 25.0 - 26.0 - 27.0
## Requirements
* PHP >= 8.0
## Installation
### Composer
To install run `composer require dgac/nmb2b-phpclient`
## Configuration
```php
use DSNA\NMB2BDriver\NMB2BClient;//only add path to services you intend to use
$client = new NMB2BClient(
"path to certificate",
"passphrase",
array(
"airspaceservices" => "path to airspace services wsdl file",
"flowservices" => "path to flow services wsdl file"
)
);//with a proxy :
$options = [
'proxy_host' => '192.x.x.x',
'proxy_port' => '8080'
];$client = new NMB2BClient(
"path to certificate",
"passphrase",
array(
"airspaceservices" => "path to airspace services wsdl file",
"flowservices" => "path to flow services wsdl file"
),
$options
);```
## Usage
### Example 1
Retrieve EAUP Chain from Airspace Services
```php
$eaupchain = $client->airspaceServices()->retrieveEAUPChain(new \DateTime('now'));//Get last AUP sequence number published before 0600 UTC
$seq = $eaupchain->getAUPSequenceNumber()
```### Example 2
Retrieve regulations for a specified TV
```php
$start = new \DateTime('2018-04-18 00:00:00');
$end = new \DateTime('2018-04-18 23:59:59');$result = $client->flowServices()->queryRegulations($start, $end, 'LF*');
foreach($result->getRegulations() as $regulation) {
$name = $regulation->getRegulationName();
}```
### Example 3
Get current version of NM services.
```php
$client->airspaceServices()->getNMVersion(); //returns "21.5.0"
```