| Total Complexity | 5 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 10 | class ExecuteCommandsDirective extends Directive implements \JsonSerializable |
||
| 11 | { |
||
| 12 | public const TYPE = 'Alexa.Presentation.APL.ExecuteCommands'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param AbstractStandardCommand[] $commands Commands to run on the rendered document |
||
| 16 | * @param string|null $token Token that identifies the RenderDocument command (for standard APL documents) |
||
| 17 | * @param string|null $presentationUri String that identifies the widget to target with commands |
||
| 18 | */ |
||
| 19 | public function __construct( |
||
| 20 | public array $commands, |
||
| 21 | public ?string $token = null, |
||
| 22 | public ?string $presentationUri = null, |
||
| 23 | ) { |
||
| 24 | } |
||
| 25 | |||
| 26 | public function addCommand(AbstractStandardCommand $command): void |
||
| 27 | { |
||
| 28 | $this->commands[] = $command; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function jsonSerialize(): array |
||
| 47 | } |
||
| 48 | } |
||
| 49 |