PHP-Parser/lib/PhpParser/Node/InterpolatedStringPart.php

33 lines
850 B
PHP
Raw Normal View History

2017-08-18 22:57:27 +02:00
<?php declare(strict_types=1);
2015-12-03 22:55:07 +01:00
namespace PhpParser\Node;
2015-12-03 22:55:07 +01:00
use PhpParser\NodeAbstract;
2015-12-03 22:55:07 +01:00
class InterpolatedStringPart extends NodeAbstract {
2015-12-03 22:55:07 +01:00
/** @var string String value */
public string $value;
2015-12-03 22:55:07 +01:00
/**
* Constructs a node representing a string part of an interpolated string.
2015-12-03 22:55:07 +01:00
*
* @param string $value String value
* @param array<string, mixed> $attributes Additional attributes
2015-12-03 22:55:07 +01:00
*/
public function __construct(string $value, array $attributes = []) {
$this->attributes = $attributes;
2015-12-03 22:55:07 +01:00
$this->value = $value;
}
public function getSubNodeNames(): array {
return ['value'];
2015-12-03 22:55:07 +01:00
}
public function getType(): string {
return 'InterpolatedStringPart';
}
2015-12-03 22:55:07 +01:00
}
2022-09-03 15:08:39 +02:00
// @deprecated compatibility alias
class_alias(InterpolatedStringPart::class, Scalar\EncapsedStringPart::class);