1 | <?php declare(strict_types=1); |
||
13 | class BeginRequest extends Record |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * The role component sets the role the Web server expects the application to play. |
||
18 | * The currently-defined roles are: |
||
19 | * FCGI_RESPONDER |
||
20 | * FCGI_AUTHORIZER |
||
21 | * FCGI_FILTER |
||
22 | * |
||
23 | * @var int |
||
24 | */ |
||
25 | protected $role = FCGI::UNKNOWN_ROLE; |
||
26 | |||
27 | /** |
||
28 | * The flags component contains a bit that controls connection shutdown. |
||
29 | * |
||
30 | * flags & FCGI_KEEP_CONN: |
||
31 | * If zero, the application closes the connection after responding to this request. |
||
32 | * If not zero, the application does not close the connection after responding to this request; |
||
33 | * the Web server retains responsibility for the connection. |
||
34 | * |
||
35 | * @var int |
||
36 | */ |
||
37 | protected $flags; |
||
38 | |||
39 | /** |
||
40 | * Reserved data, 5 bytes maximum |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | protected $reserved1; |
||
45 | |||
46 | public function __construct(int $role = FCGI::UNKNOWN_ROLE, int $flags = 0, string $reserved = '') |
||
54 | 3 | ||
55 | 3 | /** |
|
56 | * Returns the role |
||
57 | * |
||
58 | * The role component sets the role the Web server expects the application to play. |
||
59 | * The currently-defined roles are: |
||
60 | * FCGI_RESPONDER |
||
61 | * FCGI_AUTHORIZER |
||
62 | * FCGI_FILTER |
||
63 | */ |
||
64 | public function getRole(): int |
||
68 | 2 | ||
69 | /** |
||
70 | 2 | * Returns the flags |
|
71 | * |
||
72 | * The flags component contains a bit that controls connection shutdown. |
||
73 | * |
||
74 | * flags & FCGI_KEEP_CONN: |
||
75 | * If zero, the application closes the connection after responding to this request. |
||
76 | * If not zero, the application does not close the connection after responding to this request; |
||
77 | * the Web server retains responsibility for the connection. |
||
78 | */ |
||
79 | public function getFlags(): int |
||
83 | |||
84 | /** |
||
85 | 2 | * {@inheritdoc} |
|
86 | * @param static $self |
||
87 | 2 | */ |
|
88 | protected static function unpackPayload($self, string $data): void |
||
96 | |||
97 | /** {@inheritdoc} */ |
||
98 | 2 | protected function packPayload(): string |
|
107 | } |
||
108 |