菜谱项目

Array_.php 685B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace PhpParser\Node\Expr;
  3. use PhpParser\Node\Expr;
  4. class Array_ extends Expr
  5. {
  6. // For use in "kind" attribute
  7. const KIND_LONG = 1; // array() syntax
  8. const KIND_SHORT = 2; // [] syntax
  9. /** @var ArrayItem[] Items */
  10. public $items;
  11. /**
  12. * Constructs an array node.
  13. *
  14. * @param ArrayItem[] $items Items of the array
  15. * @param array $attributes Additional attributes
  16. */
  17. public function __construct(array $items = array(), array $attributes = array()) {
  18. parent::__construct($attributes);
  19. $this->items = $items;
  20. }
  21. public function getSubNodeNames() {
  22. return array('items');
  23. }
  24. }