PHP code example of bridgemate / dataconnector-client
1. Go to this page and download the library: Download bridgemate/dataconnector-client library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bridgemate / dataconnector-client example snippets
use Bridgemate\DataConnector\DataConnectorClient;
use Bridgemate\DataConnector\Dto\DataConnectorResponseData;
use Bridgemate\DataConnector\Dto\InitDTO;
// Data Connector on the same computer (port discovered through the registry, default 5079):
$client = new DataConnectorClient('YourClubId', 'YourLicenceKey');
// Data Connector on another computer on the local network:
$client = new DataConnectorClient('YourClubId', 'YourLicenceKey', 'http://192.168.1.50:5079');
// Check the connection.
$response = $client->connect();
// Create an event in BCS (see the developer's guide for how to build the InitDTO).
$initDto = new InitDTO();
// ... fill sessions, scoring groups, sections, tables, rounds ...
$response = $client->initialize($initDto);
// Poll for new board results and accept them once processed.
$results = $client->pollForResults($sessionGuid);
foreach ($results as $result) {
// store the result in your scoring program
}
if ($results !== []) {
$client->acceptQueueData($sessionGuid, DataConnectorResponseData::Results);
}
composer install
php examples/getting-started.php # interactive menu
php examples/getting-started.php --scenario # unattended full flow
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.