1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of the keinos/mastodon-streaming-api-config package. |
5
|
|
|
* |
6
|
|
|
* - Authors, copyright, license, usage and etc.: |
7
|
|
|
* - See: https://github.com/KEINOS/Mastodon_StreamingAPI_Config/ |
8
|
|
|
*/ |
9
|
|
|
|
10
|
|
|
declare(strict_types=1); |
11
|
|
|
|
12
|
|
|
namespace KEINOS\MSTDN_TOOLS\Config; |
13
|
|
|
|
14
|
|
|
trait PropertiesTrait |
15
|
|
|
{ |
16
|
|
|
/** @var string */ |
17
|
|
|
protected $access_token; |
18
|
|
|
public function setAccessToken(string $access_token): void |
19
|
|
|
{ |
20
|
|
|
$this->access_token = $access_token; |
21
|
|
|
} |
22
|
|
|
public function getAccessToken(): string |
23
|
|
|
{ |
24
|
|
|
return $this->access_token; |
25
|
|
|
} |
26
|
|
|
|
27
|
|
|
/** @var string */ |
28
|
|
|
protected $endpoint_api_instance; |
29
|
|
|
public function setEndpointApiInstance(string $path): void |
30
|
|
|
{ |
31
|
|
|
$this->endpoint_api_instance = $path; |
32
|
|
|
} |
33
|
|
|
public function getEndpointApiInstance(): string |
34
|
|
|
{ |
35
|
|
|
return $this->endpoint_api_instance; |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** @var string */ |
39
|
|
|
protected $endpoint_api_streaming_local; |
40
|
|
|
public function setEndpointApiStreamingLocal(string $path): void |
41
|
|
|
{ |
42
|
|
|
$this->endpoint_api_streaming_local = $path; |
43
|
|
|
} |
44
|
|
|
public function getEndpointApiStreamingLocal(): string |
45
|
|
|
{ |
46
|
|
|
return $this->endpoint_api_streaming_local; |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
/** @var string */ |
50
|
|
|
protected $endpoint_api_streaming_public; |
51
|
|
|
public function setEndpointApiStreamingPublic(string $path): void |
52
|
|
|
{ |
53
|
|
|
$this->endpoint_api_streaming_public = $path; |
54
|
|
|
} |
55
|
|
|
public function getEndpointApiStreamingPublic(): string |
56
|
|
|
{ |
57
|
|
|
return $this->endpoint_api_streaming_public; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** @var bool */ |
61
|
|
|
protected $flag_use_cache; |
62
|
|
|
public function setFlagUseCache(bool $flag): void |
63
|
|
|
{ |
64
|
|
|
$this->flag_use_cache = $flag; |
65
|
|
|
} |
66
|
|
|
public function getFlagUseCache(): bool |
67
|
|
|
{ |
68
|
|
|
return $this->flag_use_cache; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** @var string */ |
72
|
|
|
protected $id_hash_self; |
73
|
|
|
public function setIdHashSelf(string $id_hash_self): void |
74
|
|
|
{ |
75
|
|
|
$this->id_hash_self = $id_hash_self; |
76
|
|
|
} |
77
|
|
|
public function getIdHashSelf(): string |
78
|
|
|
{ |
79
|
|
|
return $this->id_hash_self; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** @var array<mixed,mixed> */ |
83
|
|
|
protected $info_instance; |
84
|
|
|
/** @param array<mixed,mixed> $info_instance */ |
85
|
|
|
public function setInfoInstance(array $info_instance): void |
86
|
|
|
{ |
87
|
|
|
$this->info_instance = $info_instance; |
88
|
|
|
} |
89
|
|
|
/** @return array<mixed,mixed> */ |
90
|
|
|
public function getInfoInstance(): array |
91
|
|
|
{ |
92
|
|
|
return $this->info_instance; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** @var string */ |
96
|
|
|
protected $prefix_cache; |
97
|
|
|
public function setPrefixCache(string $prefix_cache): void |
98
|
|
|
{ |
99
|
|
|
$this->prefix_cache = $prefix_cache; |
100
|
|
|
} |
101
|
|
|
public function getPrefixCache(): string |
102
|
|
|
{ |
103
|
|
|
return $this->prefix_cache; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** @var int */ |
107
|
|
|
protected $ttl_cache; |
108
|
|
|
public function setTtlCache(int $ttl): void |
109
|
|
|
{ |
110
|
|
|
$this->ttl_cache = $ttl; |
111
|
|
|
} |
112
|
|
|
public function getTtlCache(): int |
113
|
|
|
{ |
114
|
|
|
return $this->ttl_cache; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** @var string */ |
118
|
|
|
protected $url_host; |
119
|
|
|
public function setUrlHost(string $url_host): void |
120
|
|
|
{ |
121
|
|
|
$this->url_host = $url_host; |
122
|
|
|
} |
123
|
|
|
public function getUrlHost(): string |
124
|
|
|
{ |
125
|
|
|
return $this->url_host; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** @var string */ |
129
|
|
|
protected $url_api_instance; |
130
|
|
|
public function setUrlApiInstance(string $url_api_instance): void |
131
|
|
|
{ |
132
|
|
|
$this->url_api_instance = $url_api_instance; |
133
|
|
|
} |
134
|
|
|
public function getUrlApiInstance(): string |
135
|
|
|
{ |
136
|
|
|
return $this->url_api_instance; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** @var string */ |
140
|
|
|
protected $url_api_streaming_local; |
141
|
|
|
public function setUrlApiStreamingLocal(string $url_api_streaming_local): void |
142
|
|
|
{ |
143
|
|
|
$this->url_api_streaming_local = $url_api_streaming_local; |
144
|
|
|
} |
145
|
|
|
public function getUrlApiStreamingLocal(): string |
146
|
|
|
{ |
147
|
|
|
return $this->url_api_streaming_local; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** @var string */ |
151
|
|
|
protected $url_api_streaming_public; |
152
|
|
|
public function setUrlApiStreamingPublic(string $url_api_streaming_public): void |
153
|
|
|
{ |
154
|
|
|
$this->url_api_streaming_public = $url_api_streaming_public; |
155
|
|
|
} |
156
|
|
|
public function getUrlApiStreamingPublic(): string |
157
|
|
|
{ |
158
|
|
|
return $this->url_api_streaming_public; |
159
|
|
|
} |
160
|
|
|
} |
161
|
|
|
|