GroupUse.php 895 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  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, $type = Use_::TYPE_NORMAL, array $attributes = array()) {
  22. parent::__construct($attributes);
  23. $this->type = $type;
  24. $this->prefix = $prefix;
  25. $this->uses = $uses;
  26. }
  27. public function getSubNodeNames() {
  28. return array('type', 'prefix', 'uses');
  29. }
  30. }