1 | <?php |
||
12 | class PendingRequest |
||
13 | { |
||
14 | private $channel; |
||
15 | private $chat; |
||
16 | private $user; |
||
17 | private $endpoint; |
||
18 | private $parameters; |
||
19 | private $delay; |
||
20 | |||
21 | 2 | public function __construct(Channel $channel, Chat $chat, User $user) |
|
27 | |||
28 | /** |
||
29 | * Set request endpoint. |
||
30 | * |
||
31 | * @param string $endpoint |
||
32 | * |
||
33 | * @return static |
||
34 | */ |
||
35 | 2 | public function endpoint(string $endpoint) |
|
41 | |||
42 | /** |
||
43 | * Set request parameters. |
||
44 | * |
||
45 | * @param $parameters |
||
46 | * |
||
47 | * @return static |
||
48 | */ |
||
49 | 2 | public function parameters($parameters) |
|
55 | |||
56 | /** |
||
57 | * Set the desired delay for the job. |
||
58 | * |
||
59 | * @param \DateTime|int|null $delay |
||
60 | * |
||
61 | * @return static |
||
62 | */ |
||
63 | 1 | public function delay($delay) |
|
69 | |||
70 | 2 | public function __destruct() |
|
82 | } |
||
83 |