No Description

Alias.php 1.1KB

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