blob: 1cd424126e1d6fc8544f3a8e22c8fb3c668ddfb4 [file] [log] [blame]
<?php
use Thrift\Protocol\TCompactProtocol;
use Thrift\Transport\THttpClient;
error_reporting(E_ALL);
require_once __DIR__ . '/../../vendor/autoload.php';
$loader = new Thrift\ClassLoader\ThriftClassLoader();
$loader->registerDefinition('ThriftTest', __DIR__ . '/../../lib/php/test/Resources/packages/phpcm');
$loader->register();
$transport = new THttpClient('localhost', 80);
$transport->setTimeoutSecs($this->timeoutSec);
$transport->addHeaders($this->generateAuthHeader());
$protocol = new TCompactProtocol($transport);
$transport->open();
$client = new \ThriftTest\ThriftTestClient($protocol);
$client->testVoid();