MagicConst.php 602 B

123456789101112131415161718192021222324252627
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Scalar;
  3. use PhpParser\Node\Scalar;
  4. abstract class MagicConst extends Scalar {
  5. /**
  6. * Constructs a magic constant node.
  7. *
  8. * @param array<string, mixed> $attributes Additional attributes
  9. */
  10. public function __construct(array $attributes = []) {
  11. $this->attributes = $attributes;
  12. }
  13. public function getSubNodeNames(): array {
  14. return [];
  15. }
  16. /**
  17. * Get name of magic constant.
  18. *
  19. * @return string Name of magic constant
  20. */
  21. abstract public function getName(): string;
  22. }