DeclareDeclare.php 690 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace PhpParser\Node\Stmt;
  3. use PhpParser\Node;
  4. class DeclareDeclare extends Node\Stmt
  5. {
  6. /** @var string Key */
  7. public $key;
  8. /** @var Node\Expr Value */
  9. public $value;
  10. /**
  11. * Constructs a declare key=>value pair node.
  12. *
  13. * @param string $key Key
  14. * @param Node\Expr $value Value
  15. * @param array $attributes Additional attributes
  16. */
  17. public function __construct($key, Node\Expr $value, array $attributes = array()) {
  18. parent::__construct($attributes);
  19. $this->key = $key;
  20. $this->value = $value;
  21. }
  22. public function getSubNodeNames() {
  23. return array('key', 'value');
  24. }
  25. }