No Description

GroupUse.php 1005B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Stmt;
  3. use PhpParser\Node\Name;
  4. use PhpParser\Node\Stmt;
  5. class GroupUse extends Stmt
  6. {
  7. /** @var int Type of group use */
  8. public $type;
  9. /** @var Name Prefix for uses */
  10. public $prefix;
  11. /** @var UseUse[] Uses */
  12. public $uses;
  13. /**
  14. * Constructs a group use node.
  15. *
  16. * @param Name $prefix Prefix for uses
  17. * @param UseUse[] $uses Uses
  18. * @param int $type Type of group use
  19. * @param array $attributes Additional attributes
  20. */
  21. public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) {
  22. $this->attributes = $attributes;
  23. $this->type = $type;
  24. $this->prefix = $prefix;
  25. $this->uses = $uses;
  26. }
  27. public function getSubNodeNames() : array {
  28. return ['type', 'prefix', 'uses'];
  29. }
  30. public function getType() : string {
  31. return 'Stmt_GroupUse';
  32. }
  33. }