This commit is contained in:
2021-03-23 13:54:34 +08:00
parent b39e4a466b
commit 53d746cf9a
2 changed files with 52 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace Annotation\Rpc;
use Annotation\Attribute;
use JetBrains\PhpStorm\Pure;
/**
* Class Producer
* @package Annotation\Rpc
*/
#[\Attribute(\Attribute::TARGET_CLASS)] class Producer extends Attribute
{
/**
* Producer constructor.
* @param string $name
*/
public function __construct(private string $name)
{
}
/**
* @param array $handler
* @return mixed
*/
#[Pure] public function execute(array $handler): mixed
{
return parent::execute($handler); // TODO: Change the autogenerated stub
}
}
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace Rpc;
interface IProducer
{
public function getConfig();
}