No Description

Relative.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Name;
  3. class Relative extends \PhpParser\Node\Name
  4. {
  5. /**
  6. * Checks whether the name is unqualified. (E.g. Name)
  7. *
  8. * @return bool Whether the name is unqualified
  9. */
  10. public function isUnqualified() : bool {
  11. return false;
  12. }
  13. /**
  14. * Checks whether the name is qualified. (E.g. Name\Name)
  15. *
  16. * @return bool Whether the name is qualified
  17. */
  18. public function isQualified() : bool {
  19. return false;
  20. }
  21. /**
  22. * Checks whether the name is fully qualified. (E.g. \Name)
  23. *
  24. * @return bool Whether the name is fully qualified
  25. */
  26. public function isFullyQualified() : bool {
  27. return false;
  28. }
  29. /**
  30. * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
  31. *
  32. * @return bool Whether the name is relative
  33. */
  34. public function isRelative() : bool {
  35. return true;
  36. }
  37. public function toCodeString() : string {
  38. return 'namespace\\' . $this->toString();
  39. }
  40. public function getType() : string {
  41. return 'Name_Relative';
  42. }
  43. }