-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFeignClient.php
More file actions
34 lines (29 loc) · 1.02 KB
/
FeignClient.php
File metadata and controls
34 lines (29 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
namespace Nacosvel\Feign\Annotation;
use Attribute;
use Nacosvel\Feign\Annotation\Concerns\FeignClientTrait;
use Nacosvel\Feign\Annotation\Contracts\FeignClientInterface;
use Nacosvel\Feign\Contracts\ClientInterface;
use Nacosvel\Feign\Contracts\ConfigurationInterface;
use Nacosvel\Feign\Contracts\FallbackInterface;
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_PROPERTY)]
class FeignClient implements FeignClientInterface
{
use FeignClientTrait;
public function __construct(
protected string $name,
protected ?string $url = null,
protected ?string $path = null,
protected string $configuration = ConfigurationInterface::class,
protected string $fallback = FallbackInterface::class,
protected string $client = ClientInterface::class,
)
{
$this->setName($name)
->setUrl($url)
->setPath($path)
->setConfiguration($configuration)
->setFallback($fallback)
->setClient($client);
}
}