No Description

ArrayItem.php 835B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace PhpParser\Node\Expr;
  3. use PhpParser\Node\Expr;
  4. /**
  5. * @property Expr $value Value
  6. * @property null|Expr $key Key
  7. * @property bool $byRef Whether to assign by reference
  8. */
  9. class ArrayItem extends Expr
  10. {
  11. /**
  12. * Constructs an array item node.
  13. *
  14. * @param Expr $value Value
  15. * @param null|Expr $key Key
  16. * @param bool $byRef Whether to assign by reference
  17. * @param array $attributes Additional attributes
  18. */
  19. public function __construct(Expr $value, Expr $key = null, $byRef = false, array $attributes = array()) {
  20. parent::__construct(
  21. array(
  22. 'key' => $key,
  23. 'value' => $value,
  24. 'byRef' => $byRef
  25. ),
  26. $attributes
  27. );
  28. }
  29. }