Encapsed.php 590 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace PhpParser\Node\Scalar;
  3. use PhpParser\Node\Expr;
  4. use PhpParser\Node\Scalar;
  5. class Encapsed extends Scalar
  6. {
  7. /** @var Expr[] list of string parts */
  8. public $parts;
  9. /**
  10. * Constructs an encapsed string node.
  11. *
  12. * @param array $parts Encaps list
  13. * @param array $attributes Additional attributes
  14. */
  15. public function __construct(array $parts, array $attributes = array()) {
  16. parent::__construct($attributes);
  17. $this->parts = $parts;
  18. }
  19. public function getSubNodeNames() {
  20. return array('parts');
  21. }
  22. }