Skip to content

Commit

Permalink
update stubs to rdkafka:4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-zh authored and isfedorov committed Dec 18, 2020
1 parent fc6e3dc commit f194bb3
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
1 change: 1 addition & 0 deletions PhpStormStubsMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ final class PhpStormStubsMap
'RdKafka\\Exception' => 'rdkafka/RdKafka/Exception.php',
'RdKafka\\KafkaConsumer' => 'rdkafka/RdKafka/KafkaConsumer.php',
'RdKafka\\KafkaConsumerTopic' => 'rdkafka/RdKafka/KafkaConsumerTopic.php',
'RdKafka\\KafkaErrorException' => 'rdkafka/RdKafka/KafkaErrorException.php',
'RdKafka\\Message' => 'rdkafka/RdKafka/Message.php',
'RdKafka\\Metadata' => 'rdkafka/RdKafka/Metadata.php',
'RdKafka\\Metadata\\Collection' => 'rdkafka/RdKafka/Metadata/Collection.php',
Expand Down
46 changes: 46 additions & 0 deletions rdkafka/RdKafka/KafkaErrorException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

namespace RdKafka;

class KafkaErrorException extends \Exception
{
/**
* @param string $message
* @param int $code
* @param string $errorString
* @param boolean $isFatal
* @param boolean $isRetriable
* @param boolean $transactionRequiresAbort
*/
public function __construct($message, $code, $errorString, $isFatal, $isRetriable, $transactionRequiresAbort)
{
}

/**
* @returns string
*/
public function getErrorString()
{
}

/**
* @returns boolean
*/
public function isFatal()
{
}

/**
* @returns boolean
*/
public function isRetriable()
{
}

/**
* @returns boolean
*/
public function transactionRequiresAbort()
{
}
}
34 changes: 34 additions & 0 deletions rdkafka/RdKafka/Producer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,38 @@ public function __construct(Conf $conf = null)
public function newTopic($topic_name, ?TopicConf $topic_conf = null)
{
}

/**
* @param int $timeoutMs
*
* @return void
*/
public function initTransactions(int $timeoutMs)
{
}

/**
* @return void
*/
public function beginTransaction()
{
}

/**
* @param int $timeoutMs
*
* @return void
*/
public function commitTransaction(int $timeoutMs)
{
}

/**
* @param int $timeoutMs
*
* @return void
*/
public function abortTransaction(int $timeoutMs)
{
}
}

0 comments on commit f194bb3

Please sign in to comment.