blob: 1cd424126e1d6fc8544f3a8e22c8fb3c668ddfb4 [file] [log] [blame]
Volodymyr Panivko68139d12024-03-19 23:14:07 +01001<?php
2
3use Thrift\Protocol\TCompactProtocol;
4use Thrift\Transport\THttpClient;
5
6error_reporting(E_ALL);
7
8require_once __DIR__ . '/../../vendor/autoload.php';
9
10$loader = new Thrift\ClassLoader\ThriftClassLoader();
11$loader->registerDefinition('ThriftTest', __DIR__ . '/../../lib/php/test/Resources/packages/phpcm');
12$loader->register();
13
14
15$transport = new THttpClient('localhost', 80);
16
17$transport->setTimeoutSecs($this->timeoutSec);
18
19$transport->addHeaders($this->generateAuthHeader());
20
21$protocol = new TCompactProtocol($transport);
22
23$transport->open();
24
25$client = new \ThriftTest\ThriftTestClient($protocol);
26$client->testVoid();