改名
This commit is contained in:
+10
-1
@@ -15,7 +15,7 @@ use Snowflake\Snowflake;
|
|||||||
abstract class Consumer implements IProducer
|
abstract class Consumer implements IProducer
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
protected ?Client $client = null;
|
protected ?Client $client = null;
|
||||||
|
|
||||||
|
|
||||||
@@ -23,6 +23,15 @@ abstract class Consumer implements IProducer
|
|||||||
public ?Producer $rpc = null;
|
public ?Producer $rpc = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Client|null
|
||||||
|
*/
|
||||||
|
public function initClient(): ?Client
|
||||||
|
{
|
||||||
|
return $this->client;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @return mixed
|
* @return mixed
|
||||||
|
|||||||
+2
-2
@@ -9,10 +9,10 @@ interface IProducer
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Client
|
* @return null|Client
|
||||||
* 初始化一个客户端
|
* 初始化一个客户端
|
||||||
*/
|
*/
|
||||||
public function initClient(): Client;
|
public function initClient(): ?Client;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user