ShellExec.php 795 B

123456789101112131415161718192021222324252627282930
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Expr;
  3. use PhpParser\Node\Expr;
  4. use PhpParser\Node\InterpolatedStringPart;
  5. class ShellExec extends Expr {
  6. /** @var (Expr|InterpolatedStringPart)[] Interpolated string array */
  7. public array $parts;
  8. /**
  9. * Constructs a shell exec (backtick) node.
  10. *
  11. * @param (Expr|InterpolatedStringPart)[] $parts Interpolated string array
  12. * @param array<string, mixed> $attributes Additional attributes
  13. */
  14. public function __construct(array $parts, array $attributes = []) {
  15. $this->attributes = $attributes;
  16. $this->parts = $parts;
  17. }
  18. public function getSubNodeNames(): array {
  19. return ['parts'];
  20. }
  21. public function getType(): string {
  22. return 'Expr_ShellExec';
  23. }
  24. }