菜谱项目

Alias.php 1020B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace PhpParser\Node\Stmt\TraitUseAdaptation;
  3. use PhpParser\Node;
  4. class Alias extends Node\Stmt\TraitUseAdaptation
  5. {
  6. /** @var null|int New modifier */
  7. public $newModifier;
  8. /** @var null|string New name */
  9. public $newName;
  10. /**
  11. * Constructs a trait use precedence adaptation node.
  12. *
  13. * @param null|Node\Name $trait Trait name
  14. * @param string $method Method name
  15. * @param null|int $newModifier New modifier
  16. * @param null|string $newName New name
  17. * @param array $attributes Additional attributes
  18. */
  19. public function __construct($trait, $method, $newModifier, $newName, array $attributes = array()) {
  20. parent::__construct($attributes);
  21. $this->trait = $trait;
  22. $this->method = $method;
  23. $this->newModifier = $newModifier;
  24. $this->newName = $newName;
  25. }
  26. public function getSubNodeNames() {
  27. return array('trait', 'method', 'newModifier', 'newName');
  28. }
  29. }