Sen descrición

EncapsedStringPart.php 721B

12345678910111213141516171819202122232425262728293031
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Scalar;
  3. use PhpParser\Node\Scalar;
  4. class EncapsedStringPart extends Scalar
  5. {
  6. /** @var string String value */
  7. public $value;
  8. /**
  9. * Constructs a node representing a string part of an encapsed string.
  10. *
  11. * @param string $value String value
  12. * @param array $attributes Additional attributes
  13. */
  14. public function __construct(string $value, array $attributes = []) {
  15. $this->attributes = $attributes;
  16. $this->value = $value;
  17. }
  18. public function getSubNodeNames() : array {
  19. return ['value'];
  20. }
  21. public function getType() : string {
  22. return 'Scalar_EncapsedStringPart';
  23. }
  24. }