PHP code example of setono / gls-webservice-bundle
1. Go to this page and download the library: Download setono/gls-webservice-bundle 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/ */
setono / gls-webservice-bundle example snippets
use Setono\GLS\Webservice\Client\ClientInterface;
final class YourService
{
public function __construct(private readonly ClientInterface $client)
{
}
}
use Setono\GLS\Webservice\Client\ClientInterface;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
return static function (ContainerConfigurator $container): void {
$container->services()
->set(YourService::class)
->args([service(ClientInterface::class)]);
};