2017-08-18 22:57:27 +02:00
|
|
|
<?php declare(strict_types=1);
|
2015-12-03 22:55:07 +01:00
|
|
|
|
|
|
|
namespace PhpParser\Node\Scalar;
|
|
|
|
|
|
|
|
use PhpParser\Node\Scalar;
|
|
|
|
|
|
|
|
class EncapsedStringPart extends Scalar
|
|
|
|
{
|
|
|
|
/** @var string String value */
|
|
|
|
public $value;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructs a node representing a string part of an encapsed string.
|
|
|
|
*
|
|
|
|
* @param string $value String value
|
|
|
|
* @param array $attributes Additional attributes
|
|
|
|
*/
|
2017-08-13 14:06:08 +02:00
|
|
|
public function __construct(string $value, array $attributes = []) {
|
2015-12-03 22:55:07 +01:00
|
|
|
parent::__construct($attributes);
|
|
|
|
$this->value = $value;
|
|
|
|
}
|
|
|
|
|
2017-04-28 21:40:59 +02:00
|
|
|
public function getSubNodeNames() : array {
|
2017-08-13 14:06:08 +02:00
|
|
|
return ['value'];
|
2015-12-03 22:55:07 +01:00
|
|
|
}
|
2017-11-12 21:25:57 +01:00
|
|
|
|
|
|
|
function getType() : string {
|
|
|
|
return 'Scalar_EncapsedStringPart';
|
|
|
|
}
|
2015-12-03 22:55:07 +01:00
|
|
|
}
|