改名
This commit is contained in:
@@ -36,7 +36,7 @@ class Loader extends BaseObject
|
|||||||
/**
|
/**
|
||||||
* @param $path
|
* @param $path
|
||||||
* @param $namespace
|
* @param $namespace
|
||||||
* @throws ComponentException
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function loader($path, $namespace)
|
public function loader($path, $namespace)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ namespace Annotation\Rpc;
|
|||||||
|
|
||||||
|
|
||||||
use Annotation\Attribute;
|
use Annotation\Attribute;
|
||||||
|
use Exception;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Rpc\IProducer;
|
use Rpc\IProducer;
|
||||||
use Snowflake\Exception\ComponentException;
|
use Snowflake\Exception\ComponentException;
|
||||||
@@ -48,11 +49,16 @@ use Snowflake\Snowflake;
|
|||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
* @throws ComponentException
|
* @throws ComponentException
|
||||||
* @throws NotFindClassException
|
* @throws NotFindClassException
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function execute(array $handler): mixed
|
public function execute(array $handler): mixed
|
||||||
{
|
{
|
||||||
$rpc = Snowflake::app()->getRpc();
|
$rpc = Snowflake::app()->getRpc();
|
||||||
$rpc->addProducer($this->cmd, $handler, $this->config);
|
$rpc->addProducer($this->cmd, $handler, $this->config);
|
||||||
|
|
||||||
|
$attributes = Snowflake::app()->getAttributes();
|
||||||
|
$attributes->injectProperty($handler[0]);
|
||||||
|
|
||||||
return parent::execute($handler);
|
return parent::execute($handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user