src/RdKafka/FFI/OffsetCommitCallbackProxy.php
<?php
declare(strict_types=1);
namespace RdKafka\FFI;
use FFI\CData;
use RdKafka;
use RdKafka\TopicPartitionList;
class OffsetCommitCallbackProxy extends CallbackProxy
{
public function __invoke(CData $consumer, int $err, CData $nativeTopicPartitionList, ?CData $opaque = null): void
{
($this->callback)(
RdKafka::resolveFromCData($consumer),
$err,
TopicPartitionList::fromCData($nativeTopicPartitionList)->asArray(),
OpaqueMap::get($opaque)
);
}
}