-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequestAttribute.php
More file actions
41 lines (34 loc) · 914 Bytes
/
RequestAttribute.php
File metadata and controls
41 lines (34 loc) · 914 Bytes
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
35
36
37
38
39
40
41
<?php
namespace Nacosvel\Feign\Annotation;
use Attribute;
use Nacosvel\Feign\Annotation\Contracts\RequestAttributeInterface;
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_PROPERTY | Attribute::TARGET_METHOD)]
class RequestAttribute implements RequestAttributeInterface
{
public const QUERY = 'query';
public const FORM_PARAMS = 'form_params';
public const BODY = 'body';
public const JSON = 'json';
public const MULTIPART = 'multipart';
public function __construct(protected string $value)
{
$this->setValue($this->value);
}
/**
* @return string
*/
public function getValue(): string
{
return $this->value;
}
/**
* @param string $value
*
* @return static
*/
public function setValue(string $value): static
{
$this->value = $value;
return $this;
}
}