PHP code example of dvzakusilo / php-services-connector

1. Go to this page and download the library: Download dvzakusilo/php-services-connector 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/ */

    

dvzakusilo / php-services-connector example snippets


class TestConnect extends PSRVConnector\Service

use TraitName;

use PSRVConnector\Connectors\Dadata\API\Clean;
use PSRVConnector\Connectors\Dadata\Connector;

ruct()
    {
        parent::__construct(new Connector(
                'API_KEY',
                'SECRET_KEY',
                ['base_uri' => 'https://cleaner.dadata.ru/api/v1/']
            )
        );
    }

    public function getDatByAddress(string $sBody)
    {
        return $this->getAddress($sBody);
    }
}

$obTest = new TestConnect();
var_dump($obTest->getDatByAddress('мск сухонска 11/-89'));