| 1 | <?php |
||
| 19 | final class ExecuteRequest implements Request |
||
| 20 | { |
||
| 21 | /** @var non-empty-array<int, int|string|array> */ |
||
| 22 | private $body; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param non-empty-array<int, int|string|array> $body |
||
| 26 | */ |
||
| 27 | 42 | private function __construct($body) |
|
| 31 | |||
| 32 | 39 | public static function fromSql(string $sql, array $params = []) : self |
|
| 41 | |||
| 42 | 6 | public static function fromStatementId(int $statementId, array $params = []) : self |
|
| 43 | { |
||
| 44 | 6 | return new self($params ? [ |
|
| 45 | 6 | Keys::STMT_ID => $statementId, |
|
| 46 | 6 | Keys::SQL_BIND => $params, |
|
| 47 | ] : [ |
||
| 48 | 6 | Keys::STMT_ID => $statementId, |
|
| 49 | ]); |
||
| 50 | } |
||
| 51 | |||
| 52 | 42 | public function getType() : int |
|
| 56 | |||
| 57 | 42 | public function getBody() : array |
|
| 61 | } |
||
| 62 |